X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e6ef6defb250c6a4720234c7dd91f8a2173662bc..26855add3861ad496efdcae8598ffdf7d1116074:/app/assets/javascripts/leaflet.extend.js.erb?ds=sidebyside diff --git a/app/assets/javascripts/leaflet.extend.js.erb b/app/assets/javascripts/leaflet.extend.js.erb index 8aa9c70ec..0df6fd381 100644 --- a/app/assets/javascripts/leaflet.extend.js.erb +++ b/app/assets/javascripts/leaflet.extend.js.erb @@ -146,6 +146,12 @@ L.extend(L.Map.prototype, { map._objectLayer.addTo(map); } }); + }, + + removeObject: function() { + this._object = null; + if (this._objectLoader) this._objectLoader.abort(); + if (this._objectLayer) this.removeLayer(this._objectLayer); } });