Merge pull request #13097 from mike-000/terrain-rgb-tileSize

Use correct terrain-rgb tile size and update max zoom
This commit is contained in:
Tim Schaub
2021-12-09 10:40:21 -06:00
committed by GitHub
3 changed files with 9 additions and 4 deletions
+4 -2
View File
@@ -15,7 +15,8 @@ const disabledLayer = new TileLayer({
attributions: attributions, attributions: attributions,
url: url:
'https://api.maptiler.com/tiles/terrain-rgb/{z}/{x}/{y}.png?key=' + key, 'https://api.maptiler.com/tiles/terrain-rgb/{z}/{x}/{y}.png?key=' + key,
maxZoom: 10, tileSize: 512,
maxZoom: 12,
crossOrigin: '', crossOrigin: '',
imageSmoothing: false, imageSmoothing: false,
}), }),
@@ -36,7 +37,8 @@ const enabledLayer = new TileLayer({
attributions: attributions, attributions: attributions,
url: url:
'https://api.maptiler.com/tiles/terrain-rgb/{z}/{x}/{y}.png?key=' + key, 'https://api.maptiler.com/tiles/terrain-rgb/{z}/{x}/{y}.png?key=' + key,
maxZoom: 10, tileSize: 512,
maxZoom: 12,
crossOrigin: '', crossOrigin: '',
}), }),
}); });
+3 -1
View File
@@ -30,7 +30,8 @@ const elevation = new TileLayer({
source: new XYZ({ source: new XYZ({
url: url:
'https://api.maptiler.com/tiles/terrain-rgb/{z}/{x}/{y}.png?key=' + key, 'https://api.maptiler.com/tiles/terrain-rgb/{z}/{x}/{y}.png?key=' + key,
maxZoom: 10, tileSize: 512,
maxZoom: 12,
crossOrigin: '', crossOrigin: '',
}), }),
}); });
@@ -52,6 +53,7 @@ const map = new Map({
attributions: attributions, attributions: attributions,
url: 'https://api.maptiler.com/maps/streets/{z}/{x}/{y}.png?key=' + key, url: 'https://api.maptiler.com/maps/streets/{z}/{x}/{y}.png?key=' + key,
tileSize: 512, tileSize: 512,
maxZoom: 22,
}), }),
}), }),
new ImageLayer({ new ImageLayer({
+2 -1
View File
@@ -31,8 +31,8 @@ const layer = new TileLayer({
source: new XYZ({ source: new XYZ({
url: url:
'https://api.maptiler.com/tiles/terrain-rgb/{z}/{x}/{y}.png?key=' + key, 'https://api.maptiler.com/tiles/terrain-rgb/{z}/{x}/{y}.png?key=' + key,
maxZoom: 10,
tileSize: 512, tileSize: 512,
maxZoom: 12,
crossOrigin: 'anonymous', crossOrigin: 'anonymous',
}), }),
style: { style: {
@@ -58,6 +58,7 @@ const map = new Map({
attributions: attributions, attributions: attributions,
crossOrigin: 'anonymous', crossOrigin: 'anonymous',
tileSize: 512, tileSize: 512,
maxZoom: 22,
}), }),
}), }),
layer, layer,