Skip to content
Snippets Groups Projects
Commit 6cbec2e9 authored by Lene Wasskog's avatar Lene Wasskog
Browse files

fix: Errors when drawing on map [VIPSUTV-946]

parent 7a1e13f7
No related branches found
No related tags found
No related merge requests found
...@@ -204,6 +204,11 @@ var app = window.app; ...@@ -204,6 +204,11 @@ var app = window.app;
// Transform the center coordinates from EPSG:4326 to EPSG:3857 // Transform the center coordinates from EPSG:4326 to EPSG:3857
const centerPosition = ol.proj.fromLonLat(center, 'EPSG:3857'); const centerPosition = ol.proj.fromLonLat(center, 'EPSG:3857');
view = new ol.View({
center: centerPosition,
zoom: zoomLevel
})
// Creating the map // Creating the map
GISInfoMap = new ol.Map({ GISInfoMap = new ol.Map({
target: olMapDivId, // Defined at the top of this file target: olMapDivId, // Defined at the top of this file
...@@ -216,10 +221,7 @@ var app = window.app; ...@@ -216,10 +221,7 @@ var app = window.app;
]), ]),
layers: allLayers, layers: allLayers,
renderer: 'canvas', renderer: 'canvas',
view: new ol.View({ view: view
center: centerPosition,
zoom: zoomLevel
})
}); });
// Marker overlay // Marker overlay
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment