Fix MapTiler API usage
This commit is contained in:
@@ -3,13 +3,13 @@ layout: example.html
|
|||||||
title: Mapbox-gl Layer
|
title: Mapbox-gl Layer
|
||||||
shortdesc: Example of a Mapbox-gl-js layer integration.
|
shortdesc: Example of a Mapbox-gl-js layer integration.
|
||||||
docs: >
|
docs: >
|
||||||
Show how to add a mapbox-gl-js layer in an openlayers map. **Note**: Make sure to get your own Mapbox API key when using this example. No map will be visible when the API key has expired.
|
Show how to add a mapbox-gl-js layer in an openlayers map. **Note**: Make sure to get your own API key at https://www.maptiler.com/cloud/ when using this example. No map will be visible when the API key has expired.
|
||||||
tags: "simple, mapbox, vector, tiles"
|
tags: "simple, mapbox, vector, tiles, maptiler"
|
||||||
resources:
|
resources:
|
||||||
- https://unpkg.com/mapbox-gl@0.54.0/dist/mapbox-gl.js
|
- https://unpkg.com/mapbox-gl@0.54.0/dist/mapbox-gl.js
|
||||||
- https://unpkg.com/mapbox-gl@0.54.0/dist/mapbox-gl.css
|
- https://unpkg.com/mapbox-gl@0.54.0/dist/mapbox-gl.css
|
||||||
cloak:
|
cloak:
|
||||||
- key: ER67WIiPdCQvhgsUjoWK
|
- key: ER67WIiPdCQvhgsUjoWK
|
||||||
value: Your Mapbox access token from https://mapbox.com/ here
|
value: Get your own API key at https://www.maptiler.com/cloud/
|
||||||
---
|
---
|
||||||
<div id="map" class="map"></div>
|
<div id="map" class="map"></div>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ const center = [-98.8, 37.9];
|
|||||||
const key = 'ER67WIiPdCQvhgsUjoWK';
|
const key = 'ER67WIiPdCQvhgsUjoWK';
|
||||||
|
|
||||||
const mbMap = new mapboxgl.Map({
|
const mbMap = new mapboxgl.Map({
|
||||||
style: 'https://maps.tilehosting.com/styles/bright/style.json?key=' + key,
|
style: 'https://api.maptiler.com/maps/bright/style.json?key=' + key,
|
||||||
attributionControl: false,
|
attributionControl: false,
|
||||||
boxZoom: false,
|
boxZoom: false,
|
||||||
center: center,
|
center: center,
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
layout: example-verbatim.html
|
layout: example-verbatim.html
|
||||||
title: Vector tiles created from a Mapbox Style object
|
title: Vector tiles created from a Mapbox Style object
|
||||||
shortdesc: Example of using ol-mapbox-style with tiles from tilehosting.com.
|
shortdesc: Example of using ol-mapbox-style with tiles from tilehosting.com.
|
||||||
tags: "vector tiles, mapbox style, ol-mapbox-style"
|
tags: "vector tiles, mapbox style, ol-mapbox-style, maptiler"
|
||||||
cloak:
|
cloak:
|
||||||
- key: lirfd6Fegsjkvs0lshxe
|
- key: ER67WIiPdCQvhgsUjoWK
|
||||||
value: Your API key from http://tilehosting.com/ here
|
value: Get your own API key at https://www.maptiler.com/cloud/
|
||||||
---
|
---
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
import apply from 'ol-mapbox-style';
|
import apply from 'ol-mapbox-style';
|
||||||
|
|
||||||
apply('map', 'https://maps.tilehosting.com/styles/topo/style.json?key=ER67WIiPdCQvhgsUjoWK');
|
apply('map', 'https://api.maptiler.com/maps/topo/style.json?key=ER67WIiPdCQvhgsUjoWK');
|
||||||
|
|||||||
Reference in New Issue
Block a user