Skip to content
Snippets Groups Projects
Commit 78956510 authored by Sébastien DA ROCHA's avatar Sébastien DA ROCHA :bicyclist:
Browse files

Merge branch 'redmine-issues/13775' into 'develop'

REDMINE_ISSUE-13775

See merge request !379
parents 5183f9ec c10f160f
No related branches found
No related tags found
No related merge requests found
...@@ -116,7 +116,7 @@ const mapService = { ...@@ -116,7 +116,7 @@ const mapService = {
overlay.setPosition(undefined); overlay.setPosition(undefined);
closer.blur(); closer.blur();
return false; return false;
}; };
} }
this.map.addOverlay(this.overlay); this.map.addOverlay(this.overlay);
...@@ -244,8 +244,11 @@ const mapService = { ...@@ -244,8 +244,11 @@ const mapService = {
addLayers: function (layers, serviceMap, optionsMap, schemaType) { addLayers: function (layers, serviceMap, optionsMap, schemaType) {
this.layers = layers; this.layers = layers;
if (layers) { //* if admin has defined basemaps for this project if (layers) { //* if admin has defined basemaps for this project
let count = 0;
layers.forEach((layer) => { layers.forEach((layer) => {
if (layer) { if (layer) {
count +=1;
const options = layer.options; const options = layer.options;
if (options) { if (options) {
options.noWrap = true; options.noWrap = true;
...@@ -268,6 +271,7 @@ const mapService = { ...@@ -268,6 +271,7 @@ const mapService = {
dictLayersToLeaflet[layer.id] = layerTms; dictLayersToLeaflet[layer.id] = layerTms;
} }
} }
dictLayersToLeaflet[layer.id].setZIndex(count);
} }
}); });
} else { //* else when no basemaps defined } else { //* else when no basemaps defined
...@@ -358,6 +362,7 @@ const mapService = { ...@@ -358,6 +362,7 @@ const mapService = {
}); });
this.mvtLayer.featureTypes = featureTypes; this.mvtLayer.featureTypes = featureTypes;
this.mvtLayer.project_slug = projectSlug; this.mvtLayer.project_slug = projectSlug;
this.mvtLayer.setZIndex(30);
this.map.addLayer(this.mvtLayer); this.map.addLayer(this.mvtLayer);
window.layerMVT = this.mvtLayer; window.layerMVT = this.mvtLayer;
}, },
...@@ -462,7 +467,7 @@ const mapService = { ...@@ -462,7 +467,7 @@ const mapService = {
source: drawSource, source: drawSource,
style: styleFunction, style: styleFunction,
}); });
olLayer.setZIndex(29);
this.map.addLayer(olLayer); this.map.addLayer(olLayer);
return drawSource; return drawSource;
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment