From 315db526c921eea5f8ad1b32a92d3030af1dfec3 Mon Sep 17 00:00:00 2001
From: mike-000 <49240900+mike-000@users.noreply.github.com>
Date: Thu, 5 Mar 2020 15:17:34 +0000
Subject: [PATCH] Replace Bing layer with MapTiler
---
examples/vector-wfs.js | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/examples/vector-wfs.js b/examples/vector-wfs.js
index 970719ab30..fdf003beb9 100644
--- a/examples/vector-wfs.js
+++ b/examples/vector-wfs.js
@@ -3,7 +3,7 @@ import View from '../src/ol/View.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js';
import {bbox as bboxStrategy} from '../src/ol/loadingstrategy.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';
import {Stroke, Style} from '../src/ol/style.js';
@@ -30,10 +30,15 @@ const vector = new VectorLayer({
})
});
+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
})
});