]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/leaflet.layers.js
Make sure we always have a base layer
[rails.git] / app / assets / javascripts / leaflet.layers.js
index edcbfbd4dd9dd94e73879908644b879f768dc51a..a364588c1dfe073f7778f0390df016b9bdc488fc 100644 (file)
@@ -7,7 +7,7 @@ L.OSM.layers = function(options) {
     var $container = $('<div>')
       .attr('class', 'control-layers');
 
-    var link = $('<a>')
+    var button = $('<a>')
       .attr('class', 'control-button')
       .attr('href', '#')
       .attr('title', 'Layers')
@@ -156,7 +156,7 @@ L.OSM.layers = function(options) {
     function toggle(e) {
       e.stopPropagation();
       e.preventDefault();
-      options.sidebar.togglePane($ui);
+      options.sidebar.togglePane($ui, button);
     }
 
     return $container[0];