diff --git a/docs/getting-started.md b/docs/getting-started.md index b213cbcff..114d51b5d 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -401,8 +401,9 @@ This is a GeoJSON `Feature` object of a `Polygon` geometry representing the grid ```js +const ACCESS_TOKEN = "pk.eyJ1Ijoib2JzZXJ2YWJsZWhxLWVuZy1hZG1pbiIsImEiOiJjbHMxaTBwdDkwYnRsMmpxeG12M2kzdWFvIn0.Ga6eIWP2YNQrEW4FzHRcTQ"; const map = L.map(document.querySelector("#map")); -const tile = L.tileLayer("https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/{z}/{x}/{y}?access_token=pk.eyJ1Ijoib2JzZXJ2YWJsZWhxLWVuZy1hZG1pbiIsImEiOiJjbHMxaTBwdDkwYnRsMmpxeG12M2kzdWFvIn0.Ga6eIWP2YNQrEW4FzHRcTQ", {attribution: '© Mapbox © OpenStreetMap', tileSize: 512, zoomOffset: -1}).addTo(map); +const tile = L.tileLayer(`https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/256/{z}/{x}/{y}@2x?access_token=${ACCESS_TOKEN}`, {attribution: '© Mapbox © OpenStreetMap'}).addTo(map); const geo = L.geoJSON().addData(forecast).addTo(map); map.fitBounds(geo.getBounds(), {padding: [50, 50]}); invalidation.then(() => map.remove());