Update various examples to use the Mapbox v4-API
This commit is contained in:
@@ -4,6 +4,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
|
||||
import OSM from '../src/ol/source/OSM.js';
|
||||
import TileJSON from '../src/ol/source/TileJSON.js';
|
||||
|
||||
const key = 'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q';
|
||||
|
||||
/**
|
||||
* Create the map.
|
||||
@@ -17,7 +18,7 @@ const map = new Map({
|
||||
}),
|
||||
new TileLayer({
|
||||
source: new TileJSON({
|
||||
url: 'https://api.tiles.mapbox.com/v3/mapbox.natural-earth-hypso-bathy.json?secure',
|
||||
url: 'https://api.tiles.mapbox.com/v4/mapbox.natural-earth-hypso-bathy.json?secure&access_token=' + key,
|
||||
crossOrigin: 'anonymous'
|
||||
}),
|
||||
minResolution: 2000,
|
||||
|
||||
Reference in New Issue
Block a user