X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/393651e8bde09adb38e3d3d377f9b5f6627ea429..58eb17cb63a3d0b670e395e7a138d40b686f8d24:/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 012538e1d..93b60c3e7 100644 --- a/app/assets/javascripts/index/notes.js.erb +++ b/app/assets/javascripts/index/notes.js.erb @@ -1,9 +1,8 @@ //= require templates/notes/show //= require templates/notes/new -function initializeNotes(map) { - var params = OSM.mapParams(), - noteLayer = map.noteLayer, +function initializeNotes(map, params) { + var noteLayer = map.noteLayer, notes = {}, newNote; @@ -50,7 +49,7 @@ function initializeNotes(map) { }); if (OSM.STATUS != 'api_offline' && OSM.STATUS != 'database_offline') { - if (params.notes || (params.layers && params.layers.indexOf('N')) >= 0) { + if (params.layers.indexOf(noteLayer.options.code) >= 0) { map.addLayer(noteLayer); }