Skip to content

Commit

Permalink
Fallback to OSM tiles (#406)
Browse files Browse the repository at this point in the history
  • Loading branch information
pdelboca authored Feb 19, 2024
1 parent daddb3d commit 23dc249
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ plugins.js
*.scssc
.DS_Store
/build
.venv
11 changes: 3 additions & 8 deletions assets/js/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,10 @@ map.on('load', function () {

});

map.setView([0, 0], 4);
map.setView([0, 0], 2);

var attr = '&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>' +
'&copy; <a href="https://www.stamen.com/" target="_blank">Stamen Design</a> ' +
'&copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> ' +
'&copy; <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>'

L.tileLayer('https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}@2x.jpg', {
attribution: attr
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);

function truncate(str, n) {
Expand Down

0 comments on commit 23dc249

Please sign in to comment.