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

@@ -175,6 +175,12 @@ class TileTexture extends EventTarget {
if (this.loaded) {
this.uploadTile_();
} else {
if (tile instanceof ImageTile) {
const image = tile.getImage();
if (image instanceof Image && !image.crossOrigin) {
image.crossOrigin = 'anonymous';
}
}
tile.addEventListener(EventType.CHANGE, this.handleTileChange_);
}
}