X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e6de9accd215774a104497a7390943c9fa890a8b..5620d7263a36fe842f4d97bc21dda5edd0651b37:/public/openlayers/OpenStreetMap.js diff --git a/public/openlayers/OpenStreetMap.js b/public/openlayers/OpenStreetMap.js index 244930866..f472d3fc1 100644 --- a/public/openlayers/OpenStreetMap.js +++ b/public/openlayers/OpenStreetMap.js @@ -185,9 +185,10 @@ OpenLayers.Layer.OSM.Maplint = OpenLayers.Class(OpenLayers.Layer.OSM, { OpenLayers.Layer.Data = OpenLayers.Class(OpenLayers.Layer, { setVisibility: function(vis) { + var oldvis = this.visibility; OpenLayers.Layer.prototype.setVisibility.apply(this, arguments); if (!this.map) { return; } - if (vis) { + if (vis && !oldvis) { new Ajax.Request('/browse/start', {asynchronous:true, evalScripts:true}); } else { if (this.stopBrowse) {