Skip to content

Commit 55840a0

Browse files
committed
mapbox tileSize, zoomOffset
1 parent 8f97726 commit 55840a0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

docs/getting-started.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,8 @@ 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";
405404
const map = L.map(document.querySelector("#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);
405+
const tile = L.tileLayer("https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/{z}/{x}/{y}?access_token=pk.eyJ1Ijoib2JzZXJ2YWJsZWhxLWVuZy1hZG1pbiIsImEiOiJjbHMxaTBwdDkwYnRsMmpxeG12M2kzdWFvIn0.Ga6eIWP2YNQrEW4FzHRcTQ", {attribution: '© <a href="https://www.mapbox.com/feedback/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>', tileSize: 512, zoomOffset: -1}).addTo(map);
407406
const geo = L.geoJSON().addData(forecast).addTo(map);
408407
map.fitBounds(geo.getBounds(), {padding: [50, 50]});
409408
invalidation.then(() => map.remove());

0 commit comments

Comments
 (0)