]> git.openstreetmap.org Git - rails.git/blobdiff - public/javascripts/map.js
api06: Fix normal way and relation uploading (i.e. not as part of a diff).
[rails.git] / public / javascripts / map.js
index 631999a0a99729854ae8e47080a3eef15ce48f2a..db5b8561638afd45ba4fa403c881b11196ddcf9f 100644 (file)
@@ -109,8 +109,12 @@ function setMapExtent(extent) {
    map.zoomToExtent(extent.clone().transform(epsg4326, map.getProjectionObject()));
 }
 
+function getMapExtent(extent) {
+   return map.getExtent().clone().transform(map.getProjectionObject(), epsg4326);
+}
+
 function getEventPosition(event) {
-   return map.getLonLatFromViewPortPx(e.xy).clone().transform(epsg4326, map.getProjectionObject());
+   return map.getLonLatFromViewPortPx(event.xy).clone().transform(map.getProjectionObject(), epsg4326);
 }
 
 function getMapLayers() {