Cap Longitudes and replace Bing with MapTiler

This commit is contained in:
mike-000
2020-03-31 22:32:02 +01:00
committed by GitHub
parent 2401e0af00
commit 3c0ff15414

View File

@@ -85,8 +85,8 @@ const vectorSource = new VectorSource({
vectorSource.addFeatures(features); vectorSource.addFeatures(features);
}); });
const query = '(node(' + const query = '(node(' +
epsg4326Extent[1] + ',' + epsg4326Extent[0] + ',' + epsg4326Extent[1] + ',' + Math.max(epsg4326Extent[0], -180) + ',' +
epsg4326Extent[3] + ',' + epsg4326Extent[2] + epsg4326Extent[3] + ',' + Math.min(epsg4326Extent[2], 180) +
');rel(bn)->.foo;way(bn);node(w)->.foo;rel(bw););out meta;'; ');rel(bn)->.foo;way(bn);node(w)->.foo;rel(bw););out meta;';
client.send(query); client.send(query);
}, },
@@ -110,10 +110,15 @@ const vector = new VectorLayer({
} }
}); });
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 raster = new TileLayer({ const raster = 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
}) })
}); });