Don't load things if the layer is already visible: if that's the case, we should already be loading.
This commit is contained in:
parent
1f0636d253
commit
3d6b28b666
1 changed files with 2 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue