Avoid startsWith for browser compatibility

This commit is contained in:
mike-000
2021-10-13 10:38:05 +01:00
parent 895749707f
commit 94a125357e

View File

@@ -380,7 +380,7 @@ class MapboxVectorLayer extends VectorTileLayer {
const source = this.getSource();
if (
styleSource.url.startsWith('mapbox://') ||
styleSource.url.indexOf('mapbox://') === 0 ||
styleSource.url.indexOf('{z}') !== -1
) {
// Tile source url, handle it directly