diff --git a/examples/kml.html b/examples/kml.html index 74cb28ecb3..c6f392d5c0 100644 --- a/examples/kml.html +++ b/examples/kml.html @@ -4,10 +4,10 @@ title: KML shortdesc: Rendering KML with a vector source. docs: > This example uses the ol/format/KML to parse KML for rendering with a vector source. -tags: "KML" +tags: "KML, maptiler" cloak: - - key: As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5 - value: Your Bing Maps Key from http://www.bingmapsportal.com/ here + - key: get_your_own_D6rA4zTHduk6KOKTXzGB + value: Get your own API key at https://www.maptiler.com/cloud/ ---
 
diff --git a/examples/kml.js b/examples/kml.js index e7b6ef5c7f..611cd5beaa 100644 --- a/examples/kml.js +++ b/examples/kml.js @@ -2,13 +2,18 @@ import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; import KML from '../src/ol/format/KML.js'; import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import BingMaps from '../src/ol/source/BingMaps.js'; +import XYZ from '../src/ol/source/XYZ.js'; import VectorSource from '../src/ol/source/Vector.js'; +const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; +const attributions = '© MapTiler ' + + '© OpenStreetMap contributors'; + const raster = new TileLayer({ - source: new BingMaps({ - imagerySet: 'Aerial', - key: 'As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5' + source: new XYZ({ + attributions: attributions, + url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key, + maxZoom: 20 }) });