From e0367677469c30acaa6ac51cd27125d4fb2cc907 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Thu, 6 Jun 2019 08:34:31 +0200 Subject: [PATCH] Use version 4 TileJSON from mapbox --- examples/icon-sprite-webgl.html | 3 +++ examples/icon-sprite-webgl.js | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/icon-sprite-webgl.html b/examples/icon-sprite-webgl.html index 7d7220d17b..f465510d4c 100644 --- a/examples/icon-sprite-webgl.html +++ b/examples/icon-sprite-webgl.html @@ -13,5 +13,8 @@ docs: > The dataset contains around 80k points and can be found here: https://www.kaggle.com/NUFORC/ufo-sightings tags: "webgl, icon, sprite, point, ufo" +cloak: + - key: pk.eyJ1IjoidHNjaGF1YiIsImEiOiJjaW5zYW5lNHkxMTNmdWttM3JyOHZtMmNtIn0.CDIBD8H-G2Gf-cPkIuWtRg + value: Your Mapbox access token from https://mapbox.com/ here ---
diff --git a/examples/icon-sprite-webgl.js b/examples/icon-sprite-webgl.js index 4b8be0cb98..7c0e1da6bd 100644 --- a/examples/icon-sprite-webgl.js +++ b/examples/icon-sprite-webgl.js @@ -10,6 +10,8 @@ import {fromLonLat} from '../src/ol/proj.js'; import WebGLPointsLayerRenderer from '../src/ol/renderer/webgl/PointsLayer.js'; import {lerp} from '../src/ol/math.js'; +const key = 'pk.eyJ1IjoidHNjaGF1YiIsImEiOiJjaW5zYW5lNHkxMTNmdWttM3JyOHZtMmNtIn0.CDIBD8H-G2Gf-cPkIuWtRg'; + const vectorSource = new Vector({ features: [], attributions: 'National UFO Reporting Center' @@ -105,7 +107,7 @@ new Map({ layers: [ new TileLayer({ source: new TileJSON({ - url: 'https://api.tiles.mapbox.com/v3/mapbox.world-dark.json?secure', + url: 'https://api.tiles.mapbox.com/v4/mapbox.world-dark.json?access_token=' + key, crossOrigin: 'anonymous' }) }),