parent
c6cde2653b
commit
a1af4d5de1
2 changed files with 11 additions and 0 deletions
|
@ -30,6 +30,11 @@ function initializeSearch(map) {
|
||||||
});
|
});
|
||||||
|
|
||||||
openSidebar();
|
openSidebar();
|
||||||
|
|
||||||
|
$("#sidebar").one("closed", function () {
|
||||||
|
map.removeLayer(marker);
|
||||||
|
map.removeObject();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function clickSearchResult(e) {
|
function clickSearchResult(e) {
|
||||||
|
|
|
@ -146,6 +146,12 @@ L.extend(L.Map.prototype, {
|
||||||
map._objectLayer.addTo(map);
|
map._objectLayer.addTo(map);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
removeObject: function() {
|
||||||
|
this._object = null;
|
||||||
|
if (this._objectLoader) this._objectLoader.abort();
|
||||||
|
if (this._objectLayer) this.removeLayer(this._objectLayer);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue