]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/leaflet.note.js
Add option to include marker in permalinks
[rails.git] / app / assets / javascripts / leaflet.note.js
index 68e09c88deb90a4403479d5b30660f53f04c522a..a38e012de63cff6f3640ef8b962b127275bd793f 100644 (file)
@@ -6,24 +6,13 @@ L.OSM.note = function (options) {
       .attr('class', 'control-note');
 
     $('<a>')
-      .attr('class', 'control-button')
+      .attr('id', 'createnoteanchor')
+      .attr('class', 'control-button geolink')
+      .attr('data-minzoom', 12)
       .attr('href', '#')
-      .attr('title', 'Notes')
       .html('<span class="icon note"></span>')
-      .on('click', toggle)
       .appendTo($container);
 
-    function toggle(e) {
-      e.stopPropagation();
-      e.preventDefault();
-
-      if (map.hasLayer(map.noteLayer)) {
-        map.removeLayer(map.noteLayer);
-      } else {
-        map.addLayer(map.noteLayer);
-      }
-    }
-
     return $container[0];
   };