Update various examples to use the Mapbox v4-API
This commit is contained in:
@@ -5,6 +5,7 @@ import {fromLonLat} from '../src/ol/proj.js';
|
||||
import OSM from '../src/ol/source/OSM.js';
|
||||
import TileJSON from '../src/ol/source/TileJSON.js';
|
||||
|
||||
const key = 'pk.eyJ1IjoiYWhvY2V2YXIiLCJhIjoiY2pzbmg0Nmk5MGF5NzQzbzRnbDNoeHJrbiJ9.7_-_gL8ur7ZtEiNwRfCy7Q';
|
||||
|
||||
const map = new Map({
|
||||
layers: [
|
||||
@@ -14,7 +15,7 @@ const map = new Map({
|
||||
}),
|
||||
new TileLayer({
|
||||
source: new TileJSON({
|
||||
url: 'https://api.tiles.mapbox.com/v3/mapbox.va-quake-aug.json?secure',
|
||||
url: 'https://api.tiles.mapbox.com/v4/mapbox.va-quake-aug.json?secure&access_token=' + key,
|
||||
crossOrigin: 'anonymous',
|
||||
// this layer has transparency, so do not fade tiles:
|
||||
transition: 0
|
||||
|
||||
Reference in New Issue
Block a user