]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/leaflet.layers.js
Create pane button fn
[rails.git] / app / assets / javascripts / leaflet.layers.js
index 518cdc7f173a96bb1d36bb2e8c993d925ffaf683..9ef2d759eea4af789f5c0d9a6882fa5d9b187528 100644 (file)
@@ -7,12 +7,7 @@ L.OSM.layers = function (options) {
     var $container = $("<div>")
       .attr("class", "control-layers");
 
-    var button = $("<a>")
-      .attr("class", "control-button")
-      .attr("href", "#")
-      .attr("title", I18n.t("javascripts.map.layers.title"))
-      .html("<span class=\"icon layers\"></span>")
-      .on("click", toggle)
+    var button = this.makeButton("layers", "javascripts.map.layers.title", toggle)
       .appendTo($container);
 
     var $ui = this.makeUI("layers-ui", "javascripts.map.layers.header", toggle);