]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/map.js.erb
Refactor notes code to work with recent site changes
[rails.git] / app / assets / javascripts / map.js.erb
index 5299340480fa4a243d94fef17ba63d3034549a9d..4c1a849dc25d5f4a4572ac74e649515a378eb0e1 100644 (file)
@@ -81,6 +81,8 @@ function createMap(divName, options) {
      map.updateSize();
    });
 
+   $("#" + divName).trigger("initialised");
+
    return map;
 }
 
@@ -219,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() {