Replace Bing layer with MapTiler

This commit is contained in:
mike-000
2020-01-24 16:31:08 +00:00
committed by GitHub
parent 1eac18f94a
commit c9c616bd6f
+8 -3
View File
@@ -15,13 +15,18 @@ const dragAndDropInteraction = new DragAndDrop({
] ]
}); });
const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB';
const attributions = '<a href="https://www.maptiler.com/copyright/" target="_blank">&copy; MapTiler</a> ' +
'<a href="https://www.openstreetmap.org/copyright" target="_blank">&copy; OpenStreetMap contributors</a>';
const map = new Map({ const map = new Map({
interactions: defaultInteractions().extend([dragAndDropInteraction]), interactions: defaultInteractions().extend([dragAndDropInteraction]),
layers: [ layers: [
new TileLayer({ new TileLayer({
source: new BingMaps({ source: new XYZ({
imagerySet: 'Aerial', attributions: attributions,
key: 'As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5' url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key,
maxZoom: 20
}) })
}) })
], ],