Default CORS request mode for tiles used in WebGL rendering

This commit is contained in:
Tim Schaub
2022-01-11 12:39:48 -07:00
parent 1f761d943f
commit e71a8b65e1
6 changed files with 25 additions and 5 deletions

View File

@@ -17,7 +17,6 @@ const imagery = new TileLayer({
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>',
crossOrigin: '',
maxZoom: 20,
}),
});

View File

@@ -33,7 +33,6 @@ const layer = new TileLayer({
'https://api.maptiler.com/tiles/terrain-rgb/{z}/{x}/{y}.png?key=' + key,
tileSize: 512,
maxZoom: 12,
crossOrigin: 'anonymous',
}),
style: {
variables: {
@@ -56,7 +55,6 @@ const map = new Map({
source: new XYZ({
url: 'https://api.maptiler.com/maps/streets/{z}/{x}/{y}.png?key=' + key,
attributions: attributions,
crossOrigin: 'anonymous',
tileSize: 512,
maxZoom: 22,
}),

View File

@@ -50,7 +50,6 @@ const shadedRelief = new TileLayer({
opacity: 0.3,
source: new XYZ({
url: 'https://{a-d}.tiles.mapbox.com/v3/aj.sf-dem/{z}/{x}/{y}.png',
crossOrigin: 'anonymous',
}),
style: {
variables: variables,

View File

@@ -22,7 +22,6 @@ const layer = new TileLayer({
variables: variables,
},
source: new XYZ({
crossOrigin: 'anonymous', // TODO: determine if we can avoid this
attributions: attributions,
url: 'https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=' + key,
maxZoom: 20,