Skip to content

Commit

Permalink
Keep the same attribution as it was in previous versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Senen committed Apr 14, 2023
1 parent dd368ad commit c3439ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/assets/javascripts/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c3439ab

Please sign in to comment.