X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/2ce7060757ecfe242ddcb045084551b6bde21368..9c7e0e13d79248830a4041877ccdcdb3981a0b7b:/app/assets/javascripts/index/new_note.js.erb?ds=sidebyside diff --git a/app/assets/javascripts/index/new_note.js.erb b/app/assets/javascripts/index/new_note.js.erb index 95e38b2d3..9990da783 100644 --- a/app/assets/javascripts/index/new_note.js.erb +++ b/app/assets/javascripts/index/new_note.js.erb @@ -30,11 +30,11 @@ OSM.NewNote = function(map) { if ($(this).hasClass('disabled')) return; - OSM.route('/new_note'); + OSM.router.route('/note/new'); }); function createNote(marker, form, url) { - var location = marker.getLatLng(); + var location = marker.getLatLng().wrap(); marker.options.draggable = false; marker.dragging.disable(); @@ -61,7 +61,7 @@ OSM.NewNote = function(map) { newNote = null; noteLayer.removeLayer(marker); addNoteButton.removeClass("active"); - OSM.route('/browse/note/' + feature.properties.id); + OSM.router.route('/note/' + feature.properties.id); } } @@ -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 () {