]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/leaflet.layers.js
Frontpage redesign
[rails.git] / app / assets / javascripts / leaflet.layers.js
index edcbfbd4dd9dd94e73879908644b879f768dc51a..2534a91c29b1071911924382697a90faff928b82 100644 (file)
@@ -7,10 +7,10 @@ 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')
+      .attr('title', I18n.t('javascripts.map.layers.title'))
       .html('<span class="icon layers"></span>')
       .on('click', toggle)
       .appendTo($container);
@@ -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];