@@ -513,7 +513,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
513
513
const { minScale, maxScale } = layer . visibleScale ;
514
514
const crs = this . map . getCRS ( ) ;
515
515
layer . minzoom = Math . max ( this . _transformScaleToZoom ( minScale , crs , layer . tileSize ) , 0 ) ;
516
- layer . maxzoom = Math . min ( 24 , this . _transformScaleToZoom ( maxScale , crs , layer . tileSize ) + 0.0000001 ) ;
516
+ layer . maxzoom = Math . min ( this . map . getMaxZoom ( ) + 1 , this . _transformScaleToZoom ( maxScale , crs , layer . tileSize ) + 0.0000001 ) ;
517
517
}
518
518
519
519
if ( type === 'tile' ) {
@@ -820,7 +820,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
820
820
return resolutions . every ( ( item , i ) => this . numberEqual ( item , conversion * mapResolutions [ i ] ) ) ;
821
821
}
822
822
_getMapResolutions ( ) {
823
- return this . _getResolutionsByExtent ( { extent : this . map . getCRS ( ) . getExtent ( ) , tileSize : 512 } )
823
+ return this . _getResolutionsByExtent ( { extent : this . map . getCRS ( ) . getExtent ( ) , maxZoom : this . map . getMaxZoom ( ) + 1 , tileSize : 512 } )
824
824
}
825
825
_getResolutionsByExtent ( { extent, maxZoom = 24 , tileSize } ) {
826
826
const width = extent [ 2 ] - extent [ 0 ] ;
@@ -1443,7 +1443,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
1443
1443
} ,
1444
1444
layout,
1445
1445
minzoom : minzoom || 0 ,
1446
- maxzoom : maxzoom || 22
1446
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1
1447
1447
} ,
1448
1448
layerInfo . layerID
1449
1449
) ;
@@ -1495,7 +1495,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
1495
1495
visibility : layerInfo . visible
1496
1496
} ,
1497
1497
minzoom : minzoom || 0 ,
1498
- maxzoom : maxzoom || 22
1498
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1
1499
1499
} ;
1500
1500
if ( filter ) {
1501
1501
layerOptions . filter = filter ;
@@ -1550,7 +1550,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
1550
1550
'icon-rotate' : iconRotateExpression || ( ( layerInfo . style . rotation || 0 ) * 180 ) / Math . PI
1551
1551
} ,
1552
1552
minzoom : minzoom || 0 ,
1553
- maxzoom : maxzoom || 22
1553
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1
1554
1554
} ;
1555
1555
if ( filter ) {
1556
1556
layerOptions . filter = filter ;
@@ -1602,7 +1602,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
1602
1602
'icon-color' : style . fillColor
1603
1603
} ,
1604
1604
minzoom : minzoom || 0 ,
1605
- maxzoom : maxzoom || 22
1605
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1
1606
1606
} ;
1607
1607
if ( filter ) {
1608
1608
layerOptions . filter = filter ;
@@ -1906,7 +1906,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
1906
1906
visibility : visible
1907
1907
} ,
1908
1908
minzoom : minzoom || 0 ,
1909
- maxzoom : maxzoom || 22
1909
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1
1910
1910
} ;
1911
1911
if ( filterExpression . length > 1 ) {
1912
1912
layerOptions . filter = filterExpression ;
@@ -2024,7 +2024,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
2024
2024
'icon-rotate' : symbolStyle . rotation || 0
2025
2025
} ,
2026
2026
minzoom : minzoom || 0 ,
2027
- maxzoom : maxzoom || 22 ,
2027
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1 ,
2028
2028
filter : imagefilterExpression
2029
2029
} ,
2030
2030
layerID
@@ -2059,7 +2059,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
2059
2059
'icon-color' : symbolStyle . fillColor
2060
2060
} ,
2061
2061
minzoom : minzoom || 0 ,
2062
- maxzoom : maxzoom || 22 ,
2062
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1 ,
2063
2063
filter : svgfilterExpression
2064
2064
} ,
2065
2065
layerID
@@ -2230,7 +2230,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
2230
2230
paint : this . _transformStyleToMapBoxGl ( defaultStyle , geomType ) ,
2231
2231
layout : { } ,
2232
2232
minzoom : minzoom || 0 ,
2233
- maxzoom : maxzoom || 22
2233
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1
2234
2234
} ,
2235
2235
markerLayerID
2236
2236
) ;
@@ -2248,7 +2248,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
2248
2248
visibility : layerInfo . visible
2249
2249
} ,
2250
2250
minzoom : minzoom || 0 ,
2251
- maxzoom : maxzoom || 22
2251
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1
2252
2252
} ,
2253
2253
markerLayerID
2254
2254
) ;
@@ -2352,7 +2352,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
2352
2352
visibility : layerInfo . visible
2353
2353
} ,
2354
2354
minzoom : minzoom || 0 ,
2355
- maxzoom : maxzoom || 22
2355
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1
2356
2356
} ) ;
2357
2357
if ( addToMap ) {
2358
2358
this . _addLayerSucceeded ( { layerInfo, features } ) ;
@@ -2559,7 +2559,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
2559
2559
paint : layerStyle . style ,
2560
2560
layout : layerStyle . layout || { } ,
2561
2561
minzoom : minzoom || 0 ,
2562
- maxzoom : maxzoom || 22
2562
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1
2563
2563
} ;
2564
2564
if ( filter ) {
2565
2565
style . filter = filter ;
@@ -2574,7 +2574,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
2574
2574
parentLayerId,
2575
2575
visibility = true ,
2576
2576
minzoom = 0 ,
2577
- maxzoom = 22 ,
2577
+ maxzoom,
2578
2578
isIserver = false ,
2579
2579
tileSize = 256 ,
2580
2580
bounds
@@ -2583,7 +2583,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
2583
2583
type : 'raster' ,
2584
2584
tiles : url ,
2585
2585
minzoom : minzoom || 0 ,
2586
- maxzoom : maxzoom || 22 ,
2586
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1 ,
2587
2587
tileSize : isIserver ? this . rasterTileSize : tileSize ,
2588
2588
rasterSource : isIserver ? 'iserver' : '' ,
2589
2589
prjCoordSys :
@@ -2606,7 +2606,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
2606
2606
type : 'raster' ,
2607
2607
source : sourceId ,
2608
2608
minzoom : minzoom || 0 ,
2609
- maxzoom : maxzoom || 22 ,
2609
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1 ,
2610
2610
layout : {
2611
2611
visibility : this . _getVisibility ( visibility )
2612
2612
}
@@ -2781,7 +2781,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
2781
2781
visibility : layerInfo . visible ? 'visible' : 'none'
2782
2782
} ,
2783
2783
minzoom : minzoom || 0 ,
2784
- maxzoom : maxzoom || 22
2784
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1
2785
2785
} ) ;
2786
2786
this . _addLayerSucceeded ( ) ;
2787
2787
}
0 commit comments