Don't change the visibility of layers with no code
When parsing a layer state ignore any layers with no code attached rather than turning them off - this ensures that the marker layer remains enabled and any markers can be displayed.
This commit is contained in:
parent
53b0ace4c0
commit
ad116b2431
1 changed files with 8 additions and 7 deletions
|
@ -260,8 +260,8 @@ function setMapLayers(layerConfig) {
|
|||
}
|
||||
} else {
|
||||
for (var i = 0; i < map.layers.length; i++) {
|
||||
if (map.layers[i].layerCode &&
|
||||
layerConfig.indexOf(map.layers[i].layerCode) >= 0) {
|
||||
if (map.layers[i].layerCode) {
|
||||
if (layerConfig.indexOf(map.layers[i].layerCode) >= 0) {
|
||||
if (map.layers[i].isBaseLayer) {
|
||||
map.setBaseLayer(map.layers[i]);
|
||||
} else {
|
||||
|
@ -272,6 +272,7 @@ function setMapLayers(layerConfig) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function scaleToZoom(scale) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue