From: Tom Hughes Date: Sat, 21 May 2011 09:44:52 +0000 (+0100) Subject: Make sure unused layers are hidden X-Git-Tag: live~6859^2~1 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/d9a8695fb18319ccc32fb97c9534707ce1df82be?ds=sidebyside;hp=--cc Make sure unused layers are hidden When parsing an old style layer configuration string, make sure any layer which isn't active is marked as invisible so that we don't include it when generating permalinks. Fixes #3773. --- d9a8695fb18319ccc32fb97c9534707ce1df82be diff --git a/public/javascripts/map.js b/public/javascripts/map.js index 66ed9e909..58950a1ff 100644 --- a/public/javascripts/map.js +++ b/public/javascripts/map.js @@ -251,6 +251,8 @@ function setMapLayers(layerConfig) { if (c == "B") { map.setBaseLayer(layers[i]); + } else { + map.layers[i].setVisibility(false); } } } else { @@ -260,7 +262,7 @@ function setMapLayers(layerConfig) { if (map.layers[i].isBaseLayer) { map.setBaseLayer(map.layers[i]); } else { - map.layers[i].setVisibility(true); + map.layers[i].setVisibility(true); } } else { map.layers[i].setVisibility(false);