Update various examples to use the Mapbox v4-API

This commit is contained in:
Marc Jansen
2019-09-23 16:49:51 +02:00
parent b58c78c546
commit 57822aa6ff
19 changed files with 54 additions and 16 deletions

View File

@@ -4,6 +4,9 @@ title: Reusable Source
shortdesc: Updating a tile source by changing the URL.
docs: >
You can call <code>source.setUrl()</code> to update the URL for a tile source. Note that when you change the URL for a tile source, existing tiles will not be replaced until new tiles are loaded. If you are interested instead in clearing currently rendered tiles, you can call the <code>source.refresh()</code> method. Alternatively, you can use two separate sources if you want to remove rendered tiles and start over loading new tiles.
cloak:
- key: pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q
value: Your Mapbox access token from https://mapbox.com/ here
---
<div id="map" class="map"></div>
<button class="switcher" value="0">January</button>