]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/leaflet.map.js.erb
Block submission of the export form when the area is too large
[rails.git] / app / assets / javascripts / leaflet.map.js.erb
index 1171390aa32904f3322d783a1d8205740ea65ebc..35370ae996108be6058ecc5b8cb8f8149d53bf49 100644 (file)
@@ -91,7 +91,7 @@ L.OSM.Map = L.Map.extend({
   },
 
   getUrl: function(marker) {
-    var precision = zoomPrecision(this.getZoom()),
+    var precision = OSM.zoomPrecision(this.getZoom()),
         params = {};
 
     if (marker && this.hasLayer(marker)) {
@@ -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 = '';