X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e4ef507c5c56ab1f700a04c099f6938a143f836f..361906af9e5a7209af3f7006acbd117ed7b85e24:/app/assets/javascripts/map.js.erb diff --git a/app/assets/javascripts/map.js.erb b/app/assets/javascripts/map.js.erb index fd5962d4f..4c1a849dc 100644 --- a/app/assets/javascripts/map.js.erb +++ b/app/assets/javascripts/map.js.erb @@ -81,6 +81,8 @@ function createMap(divName, options) { map.updateSize(); }); + $("#" + divName).trigger("initialised"); + return map; } @@ -196,7 +198,6 @@ function openMapPopup(marker, description) { function closeMapPopup() { if (popup) { map.removePopup(popup); - delete popup; } } @@ -220,7 +221,7 @@ function setMapCenter(center, zoom) { } function getEventPosition(event) { - return map.getLonLatFromViewPortPx(event.xy).clone().transform(map.getProjectionObject(), epsg4326); + return unproj(map.getLonLatFromViewPortPx(event.xy)); } function getMapLayers() {