X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/9d2f920feb9dce028b985e8d452538d3df7a1d9c..f4e29905263efbb2eafdedad6a5c050ba559efd8:/app/assets/javascripts/leaflet.map.js?ds=sidebyside
diff --git a/app/assets/javascripts/leaflet.map.js b/app/assets/javascripts/leaflet.map.js
index d952a7376..e712a8d1f 100644
--- a/app/assets/javascripts/leaflet.map.js
+++ b/app/assets/javascripts/leaflet.map.js
@@ -44,7 +44,7 @@ L.OSM.Map = L.Map.extend({
}
this.baseLayers.push(new L.OSM.HOT({
- attribution: copyright + ". Tiles courtesy of Humanitarian OpenStreetMap Team",
+ attribution: copyright + ". Tiles style by Humanitarian OpenStreetMap Team" + " hosted by OpenStreetMap France",
code: "H",
keyid: "hot",
name: I18n.t("javascripts.map.base.hot")
@@ -61,6 +61,12 @@ L.OSM.Map = L.Map.extend({
code: "G",
name: I18n.t("javascripts.map.base.gps")
});
+
+ this.on("layeradd", function (event) {
+ if (this.baseLayers.indexOf(event.layer) >= 0) {
+ this.setMaxZoom(event.layer.options.maxZoom);
+ }
+ });
},
updateLayers: function(layerParam) {