refine mapbox style json match
This commit is contained in:
parent
18d3bd426b
commit
7f143bf843
1 changed files with 4 additions and 1 deletions
|
@ -27,7 +27,10 @@
|
|||
let resourceType: 'raster' | 'vector' = 'raster';
|
||||
|
||||
$: if (tileUrls[0].length > 0) {
|
||||
if (tileUrls[0].includes('.json') || tileUrls[0].includes('api.mapbox.com/styles')) {
|
||||
if (
|
||||
tileUrls[0].includes('.json') ||
|
||||
(tileUrls[0].includes('api.mapbox.com/styles') && !tileUrls[0].includes('tiles'))
|
||||
) {
|
||||
resourceType = 'vector';
|
||||
layerType = 'basemap';
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue