X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e6ef6defb250c6a4720234c7dd91f8a2173662bc..b9daf066842c9e15489d0ccd387d694021975222:/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); } });