]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/new_note.js.erb
Nominatim results zoom to the result location
[rails.git] / app / assets / javascripts / index / new_note.js.erb
index 95e38b2d3dea4a39a064f32277d6539a8c37092c..29977cd5775e5e542aa8a6351db84e15ed8bfeab 100644 (file)
@@ -34,7 +34,7 @@ OSM.NewNote = function(map) {
   });
 
   function createNote(marker, form, url) {
-    var location = marker.getLatLng();
+    var location = marker.getLatLng().wrap();
 
     marker.options.draggable = false;
     marker.dragging.disable();
@@ -123,7 +123,6 @@ OSM.NewNote = function(map) {
     });
 
     newNote.on("dragstart dragend", function(a) {
-      console.log(a);
       newHalo(newNote.getLatLng(), a.type);
     });
 
@@ -150,6 +149,8 @@ OSM.NewNote = function(map) {
       e.preventDefault();
       createNote(newNote, e.target.form, '/api/0.6/notes.json');
     });
+
+    return map.getState();
   };
 
   page.unload = function () {