]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/notes.js.erb
Add notes sidebar interaction
[rails.git] / app / assets / javascripts / index / notes.js.erb
index 4538e9968cb9bfc22438c6b416cd3e6f7167f676..75ca5ad50a3382072ea5a05b9b033bee6e5df79b 100644 (file)
@@ -72,6 +72,7 @@ function initializeNotes(map) {
         icon: noteIcons[feature.properties.status],
         opacity: 0.9
       });
+      marker.id = feature.properties.id;
       marker.addTo(noteLayer).bindPopup(
         createPopupContent(marker, feature.properties),
         popupOptions()
@@ -80,6 +81,10 @@ function initializeNotes(map) {
     return marker;
   }
 
+  noteLayer.getLayerId = function(marker) {
+    return marker.id;
+  };
+
   var noteLoader;
 
   function loadNotes() {