Keep the same attribution as it was in previous versions

This commit is contained in:
Senén Rodero Rodríguez
2023-03-29 13:50:56 +02:00
parent dd368ad650
commit c3439ab539

View File

@@ -7,6 +7,9 @@
App.Map.initializeMap(this);
});
},
attributionPrefix: function() {
return '<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">Leaflet</a>';
},
destroy: function() {
App.Map.maps.forEach(function(map) {
map.off();
@@ -118,6 +121,7 @@
};
mapCenterLatLng = new L.LatLng(mapCenterLatitude, mapCenterLongitude);
map = L.map(element.id, { scrollWheelZoom: false }).setView(mapCenterLatLng, zoom);
map.attributionControl.setPrefix(App.Map.attributionPrefix());
App.Map.maps.push(map);
L.tileLayer(mapTilesProvider, {
attribution: mapAttribution