Skip to content
Snippets Groups Projects
Commit 9ffee344 authored by vil's avatar vil
Browse files

Removed line and save, added full path to geoserver

parent aed5951c
Branches
Tags
No related merge requests found
...@@ -57,6 +57,20 @@ function initMap(center, zoomLevel, displayMarker, drawnObjs) { ...@@ -57,6 +57,20 @@ function initMap(center, zoomLevel, displayMarker, drawnObjs) {
}) })
}); });
var topo2graatone = new ol.layer.Tile({
title: "Gråtone",
type: 'base',
visible: false,
source: new ol.source.TileWMS({
url: "http://opencache.statkart.no/gatekeeper/gk/gk.open?",
params: {
LAYERS: 'topo2graatone',
VERSION: '1.1.1'
}
})
});
var fylke_layer = new ol.layer.Vector({ var fylke_layer = new ol.layer.Vector({
title: 'Fylkesgrenser', title: 'Fylkesgrenser',
type: 'overlay', type: 'overlay',
...@@ -64,7 +78,7 @@ function initMap(center, zoomLevel, displayMarker, drawnObjs) { ...@@ -64,7 +78,7 @@ function initMap(center, zoomLevel, displayMarker, drawnObjs) {
source: new ol.source.Vector({ source: new ol.source.Vector({
projection: 'EPSG:3857', projection: 'EPSG:3857',
format: new ol.format.GeoJSON(), format: new ol.format.GeoJSON(),
url: '/geoserver/ows?srsname=EPSG:3857&format_options=decimals:0&service=WFS&version=1.0.0&outputFormat=json&request=GetFeature&typeName=sl:n5_forv_fylke_mv&' url: 'http://kart13.skogoglandskap.no/geoserver/ows?srsname=EPSG:3857&format_options=decimals:0&service=WFS&version=1.0.0&outputFormat=json&request=GetFeature&typeName=sl:n5_forv_fylke_mv&'
}), }),
style: new ol.style.Style({ style: new ol.style.Style({
stroke: new ol.style.Stroke({ stroke: new ol.style.Stroke({
...@@ -80,7 +94,7 @@ function initMap(center, zoomLevel, displayMarker, drawnObjs) { ...@@ -80,7 +94,7 @@ function initMap(center, zoomLevel, displayMarker, drawnObjs) {
source: new ol.source.Vector({ source: new ol.source.Vector({
projection: 'EPSG:3857', projection: 'EPSG:3857',
format: new ol.format.GeoJSON(), format: new ol.format.GeoJSON(),
url: '/geoserver/ows?srsname=EPSG:3857&format_options=decimals:0&service=WFS&version=1.0.0&outputFormat=json&request=GetFeature&typeName=sl:n2000_komm_flate&' url: 'http://kart13.skogoglandskap.no/geoserver/ows?srsname=EPSG:3857&format_options=decimals:0&service=WFS&version=1.0.0&outputFormat=json&request=GetFeature&typeName=sl:n2000_komm_flate&'
}), }),
style: new ol.style.Style({ style: new ol.style.Style({
stroke: new ol.style.Stroke({ stroke: new ol.style.Stroke({
...@@ -95,7 +109,7 @@ function initMap(center, zoomLevel, displayMarker, drawnObjs) { ...@@ -95,7 +109,7 @@ function initMap(center, zoomLevel, displayMarker, drawnObjs) {
var map = new ol.Map({ var map = new ol.Map({
target: 'observationFormMap', target: 'observationFormMap',
//layers: layers, //layers: layers,
layers: [osm, bingArial, fylke_layer, kommune_layer], layers: [osm, bingArial, topo2graatone, fylke_layer, kommune_layer],
renderer: 'canvas' renderer: 'canvas'
}); });
......
...@@ -131,11 +131,9 @@ ...@@ -131,11 +131,9 @@
<label>What do you want to draw</label> <label>What do you want to draw</label>
<select id="type"> <select id="type">
<option value="Point">Point</option> <option value="Point">Point</option>
<option value="LineString">Line</option>
<option value="Polygon">Polygon</option> <option value="Polygon">Polygon</option>
</select> </select>
<button id="delete" type="button">Clear all</button> <button id="delete" type="button">Clear all</button>
<button id="save-button" type="button">Save</button>
</div> </div>
<div id="observationFormMap" class="map"> <div id="observationFormMap" class="map">
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment