Include selected layer in short links
[rails.git] / app / assets / javascripts / leaflet.map.js.erb
index 1171390aa32904f3322d783a1d8205740ea65ebc..7ae330d9bfcd50b7b1c0819fd15f6256222ef753 100644 (file)
@@ -148,6 +148,11 @@ L.OSM.Map = L.Map.extend({
     }
 
     var params = {};
+    var layers = this.getLayersCode().replace('M', '');
+
+    if (layers) {
+      params.layers = layers;
+    }
 
     if (marker && this.hasLayer(marker)) {
       params.m = '';