X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/9d33721630e02ab9bed1d7853be4fcb5960d7b4f..f1a4669c957d29c012466768581c4a801e5029be:/app/assets/javascripts/index/notes.js.erb diff --git a/app/assets/javascripts/index/notes.js.erb b/app/assets/javascripts/index/notes.js.erb index 1646e8b6d..3a2a15393 100644 --- a/app/assets/javascripts/index/notes.js.erb +++ b/app/assets/javascripts/index/notes.js.erb @@ -3,7 +3,7 @@ function initializeNotes(map) { var params = OSM.mapParams(), - noteLayer = new L.LayerGroup({code: 'N'}), + noteLayer = map.noteLayer, notes = {}, newNote; @@ -25,8 +25,6 @@ function initializeNotes(map) { }) }; - map.noteLayer = noteLayer; - map.on("layeradd", function (e) { if (e.layer == noteLayer) { loadNotes();