X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/6ba9f8ba294bb21d53060e92541dc465b9e42c4a..e336fc31c71c694397603aa05a9e48c99bc8fb5d:/app/assets/javascripts/index/new_note.js.erb diff --git a/app/assets/javascripts/index/new_note.js.erb b/app/assets/javascripts/index/new_note.js.erb index 7ac37ab72..4c728d2f5 100644 --- a/app/assets/javascripts/index/new_note.js.erb +++ b/app/assets/javascripts/index/new_note.js.erb @@ -3,7 +3,8 @@ OSM.NewNote = function(map) { content = $('#sidebar_content'), page = {}, addNoteButton = $(".control-note .control-button"), - newNote; + newNote, + halo; var noteIcons = { "new": L.icon({ @@ -106,6 +107,15 @@ OSM.NewNote = function(map) { newNote.addTo(noteLayer); + halo = L.circleMarker(map.containerPointToLatLng(markerPosition), { + weight: 2.5, + radius: 20, + fillOpacity: 0.5, + color: "#FF6200" + }); + + map.addLayer(halo); + newNote.on("remove", function () { addNoteButton.removeClass("active"); }).on("dragstart",function () { @@ -130,6 +140,7 @@ OSM.NewNote = function(map) { page.unload = function () { noteLayer.removeLayer(newNote); + map.removeLayer(halo); addNoteButton.removeClass("active"); };