File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -401,8 +401,9 @@ This is a GeoJSON `Feature` object of a `Polygon` geometry representing the grid
401
401
</figure >
402
402
403
403
``` js
404
+ const ACCESS_TOKEN = " pk.eyJ1Ijoib2JzZXJ2YWJsZWhxLWVuZy1hZG1pbiIsImEiOiJjbHMxaTBwdDkwYnRsMmpxeG12M2kzdWFvIn0.Ga6eIWP2YNQrEW4FzHRcTQ" ;
404
405
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);
406
407
const geo = L .geoJSON ().addData (forecast).addTo (map);
407
408
map .fitBounds (geo .getBounds (), {padding: [50 , 50 ]});
408
409
invalidation .then (() => map .remove ());
You can’t perform that action at this time.
0 commit comments