Skip to content

Commit 8f97726

Browse files
committed
mapbox/streets-v11
1 parent a1c72b4 commit 8f97726

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/getting-started.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,9 @@ This is a GeoJSON `Feature` object of a `Polygon` geometry representing the grid
401401
</figure>
402402

403403
```js
404+
const ACCESS_TOKEN = "pk.eyJ1Ijoib2JzZXJ2YWJsZWhxLWVuZy1hZG1pbiIsImEiOiJjbHMxaTBwdDkwYnRsMmpxeG12M2kzdWFvIn0.Ga6eIWP2YNQrEW4FzHRcTQ";
404405
const map = L.map(document.querySelector("#map"));
405-
const tile = L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png").addTo(map);
406+
const tile = L.tileLayer(`https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/{z}/{x}/{y}?access_token=${ACCESS_TOKEN}`).addTo(map);
406407
const geo = L.geoJSON().addData(forecast).addTo(map);
407408
map.fitBounds(geo.getBounds(), {padding: [50, 50]});
408409
invalidation.then(() => map.remove());

0 commit comments

Comments
 (0)