X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e6ef6defb250c6a4720234c7dd91f8a2173662bc..2fa422578448314fb6fad888b5c47cf994cb0b8c:/app/assets/javascripts/leaflet.extend.js.erb 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); } });