Skip to content

Commit

Permalink
Fixing drawing order of Extra Layers
Browse files Browse the repository at this point in the history
  • Loading branch information
uprel committed Nov 24, 2019
1 parent 0357283 commit 30018f9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
5 changes: 4 additions & 1 deletion client/site/js/WebgisInit_functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -580,14 +580,17 @@ function postLoading() {
//we need to make sure that OpenLayers.map.fallThrough is set to true
//otherwise the mouse events are swallowed
MapOptions.fallThrough = true;

var reverseExtra = Eqwc.common.reverseArray(extraLayers);

//creating the GeoExt map panel
geoExtMap = new GeoExt.MapPanel({
frame: false,
border: false,
//zoom: 1.6,
extent: projectData.makeExtentFromArray(projectData.extent.split(','), false),
layers: baseLayers.concat(
extraLayers.concat(
reverseExtra.concat(
[
thematicLayer = new OpenLayers.Layer.WMS(layerTree.root.firstChild.text,
wmsURI, {
Expand Down
10 changes: 9 additions & 1 deletion client_common/eqwc_common.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,12 @@ Eqwc.common.parseInputTextToCoord = function(input) {
}

return coord;
};
};

Eqwc.common.reverseArray = function(arr) {
var newArray = [];
for (var i = arr.length - 1; i >= 0; i--) {
newArray.push(arr[i]);
}
return newArray;
}
2 changes: 1 addition & 1 deletion client_mobile/src/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ Map.setBackgroundLayer = function (layerName, layerId, isBase) {
layOl3.name = lay.name;

// add background as base layer
Map.map.getLayers().insertAt(layerId, layOl3);
Map.map.getLayers().insertAt(0, layOl3);
Map.backgroundLayers[layOl3.name] = layOl3;
};

Expand Down

0 comments on commit 30018f9

Please sign in to comment.