X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ae4487921350e141efed42fdf7cd3fd70d72bc97..00f82918e6b77b475b0ddd51b8df45bf8fda51a1:/app/assets/javascripts/leaflet.map.js
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) {