diff --git a/examples/drag-and-drop-image-vector.html b/examples/drag-and-drop-image-vector.html index f6f791278f..2c0e0eab50 100644 --- a/examples/drag-and-drop-image-vector.html +++ b/examples/drag-and-drop-image-vector.html @@ -4,10 +4,10 @@ title: Drag-and-Drop Image Vector shortdesc: Example of using the drag-and-drop interaction with image vector rendering. docs: > Example of using the drag-and-drop interaction with an `ol/layer/VectorImage` layer. Drag and drop GPX, GeoJSON, IGC, KML, or TopoJSON files on to the map. Each file is rendered to an image on the client. -tags: "drag-and-drop-image-vector, gpx, geojson, igc, kml, topojson, vector, image" +tags: "drag-and-drop-image-vector, gpx, geojson, igc, kml, topojson, maptiler, vector, image" 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/drag-and-drop-image-vector.js b/examples/drag-and-drop-image-vector.js index 6b0fb4a3c2..56491c33dd 100644 --- a/examples/drag-and-drop-image-vector.js +++ b/examples/drag-and-drop-image-vector.js @@ -3,7 +3,7 @@ import View from '../src/ol/View.js'; import {GPX, GeoJSON, IGC, KML, TopoJSON} from '../src/ol/format.js'; import {defaults as defaultInteractions, DragAndDrop} from '../src/ol/interaction.js'; import {VectorImage as VectorImageLayer, Tile as TileLayer} from '../src/ol/layer.js'; -import {BingMaps, Vector as VectorSource} from '../src/ol/source.js'; +import {XYZ, Vector as VectorSource} from '../src/ol/source.js'; const dragAndDropInteraction = new DragAndDrop({ formatConstructors: [ @@ -15,13 +15,18 @@ const dragAndDropInteraction = new DragAndDrop({ ] }); +const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; +const attributions = '© MapTiler ' + + '© OpenStreetMap contributors'; + const map = new Map({ interactions: defaultInteractions().extend([dragAndDropInteraction]), layers: [ 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 }) }) ], diff --git a/examples/drag-and-drop.html b/examples/drag-and-drop.html index 41c82fd81e..c8f0772329 100644 --- a/examples/drag-and-drop.html +++ b/examples/drag-and-drop.html @@ -4,10 +4,10 @@ title: Drag-and-Drop shortdesc: Example of using the drag-and-drop interaction. docs: > Example of using the drag-and-drop interaction. Drag and drop GPX, GeoJSON, IGC, KML, or TopoJSON files on to the map. There is no projection transform support, so this will only work with data in EPSG:4326 and EPSG:3857. -tags: "drag-and-drop, gpx, geojson, igc, kml, topojson" +tags: "drag-and-drop, gpx, geojson, igc, kml, topojson, 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/drag-and-drop.js b/examples/drag-and-drop.js index 3ed202752c..0f407fec82 100644 --- a/examples/drag-and-drop.js +++ b/examples/drag-and-drop.js @@ -3,7 +3,7 @@ import View from '../src/ol/View.js'; import {GPX, GeoJSON, IGC, KML, TopoJSON} from '../src/ol/format.js'; import {defaults as defaultInteractions, DragAndDrop} from '../src/ol/interaction.js'; import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js'; -import {BingMaps, Vector as VectorSource} from '../src/ol/source.js'; +import {XYZ, Vector as VectorSource} from '../src/ol/source.js'; const dragAndDropInteraction = new DragAndDrop({ formatConstructors: [ @@ -15,13 +15,18 @@ const dragAndDropInteraction = new DragAndDrop({ ] }); +const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB'; +const attributions = '© MapTiler ' + + '© OpenStreetMap contributors'; + const map = new Map({ interactions: defaultInteractions().extend([dragAndDropInteraction]), layers: [ 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 }) }) ],