X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/ae4487921350e141efed42fdf7cd3fd70d72bc97..22c1be4db7054baf155a6c1c24f31063b5b729df:/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) {