@@ -445,7 +445,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
445
445
const { minScale, maxScale } = layer . visibleScale ;
446
446
const crs = this . map . getCRS ( ) ;
447
447
layer . minzoom = Math . max ( this . _transformScaleToZoom ( minScale , crs , layer . tileSize ) , 0 ) ;
448
- layer . maxzoom = Math . min ( 24 , this . _transformScaleToZoom ( maxScale , crs , layer . tileSize ) + 0.0000001 ) ;
448
+ layer . maxzoom = Math . min ( this . map . getMaxZoom ( ) + 1 , this . _transformScaleToZoom ( maxScale , crs , layer . tileSize ) + 0.0000001 ) ;
449
449
}
450
450
451
451
if ( type === 'tile' ) {
@@ -752,7 +752,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
752
752
return resolutions . every ( ( item , i ) => this . numberEqual ( item , conversion * mapResolutions [ i ] ) ) ;
753
753
}
754
754
_getMapResolutions ( ) {
755
- return this . _getResolutionsByExtent ( { extent : this . map . getCRS ( ) . getExtent ( ) , tileSize : 512 } )
755
+ return this . _getResolutionsByExtent ( { extent : this . map . getCRS ( ) . getExtent ( ) , maxZoom : this . map . getMaxZoom ( ) + 1 , tileSize : 512 } )
756
756
}
757
757
_getResolutionsByExtent ( { extent, maxZoom = 24 , tileSize } ) {
758
758
const width = extent [ 2 ] - extent [ 0 ] ;
@@ -1375,7 +1375,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
1375
1375
} ,
1376
1376
layout,
1377
1377
minzoom : minzoom || 0 ,
1378
- maxzoom : maxzoom || 22
1378
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1
1379
1379
} ,
1380
1380
layerInfo . layerID
1381
1381
) ;
@@ -1427,7 +1427,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
1427
1427
visibility : layerInfo . visible
1428
1428
} ,
1429
1429
minzoom : minzoom || 0 ,
1430
- maxzoom : maxzoom || 22
1430
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1
1431
1431
} ;
1432
1432
if ( filter ) {
1433
1433
layerOptions . filter = filter ;
@@ -1482,7 +1482,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
1482
1482
'icon-rotate' : iconRotateExpression || ( ( layerInfo . style . rotation || 0 ) * 180 ) / Math . PI
1483
1483
} ,
1484
1484
minzoom : minzoom || 0 ,
1485
- maxzoom : maxzoom || 22
1485
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1
1486
1486
} ;
1487
1487
if ( filter ) {
1488
1488
layerOptions . filter = filter ;
@@ -1534,7 +1534,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
1534
1534
'icon-color' : style . fillColor
1535
1535
} ,
1536
1536
minzoom : minzoom || 0 ,
1537
- maxzoom : maxzoom || 22
1537
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1
1538
1538
} ;
1539
1539
if ( filter ) {
1540
1540
layerOptions . filter = filter ;
@@ -1838,7 +1838,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
1838
1838
visibility : visible
1839
1839
} ,
1840
1840
minzoom : minzoom || 0 ,
1841
- maxzoom : maxzoom || 22
1841
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1
1842
1842
} ;
1843
1843
if ( filterExpression . length > 1 ) {
1844
1844
layerOptions . filter = filterExpression ;
@@ -1956,7 +1956,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
1956
1956
'icon-rotate' : symbolStyle . rotation || 0
1957
1957
} ,
1958
1958
minzoom : minzoom || 0 ,
1959
- maxzoom : maxzoom || 22 ,
1959
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1 ,
1960
1960
filter : imagefilterExpression
1961
1961
} ,
1962
1962
layerID
@@ -1991,7 +1991,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
1991
1991
'icon-color' : symbolStyle . fillColor
1992
1992
} ,
1993
1993
minzoom : minzoom || 0 ,
1994
- maxzoom : maxzoom || 22 ,
1994
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1 ,
1995
1995
filter : svgfilterExpression
1996
1996
} ,
1997
1997
layerID
@@ -2162,7 +2162,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
2162
2162
paint : this . _transformStyleToMapBoxGl ( defaultStyle , geomType ) ,
2163
2163
layout : { } ,
2164
2164
minzoom : minzoom || 0 ,
2165
- maxzoom : maxzoom || 22
2165
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1
2166
2166
} ,
2167
2167
markerLayerID
2168
2168
) ;
@@ -2180,7 +2180,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
2180
2180
visibility : layerInfo . visible
2181
2181
} ,
2182
2182
minzoom : minzoom || 0 ,
2183
- maxzoom : maxzoom || 22
2183
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1
2184
2184
} ,
2185
2185
markerLayerID
2186
2186
) ;
@@ -2284,7 +2284,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
2284
2284
visibility : layerInfo . visible
2285
2285
} ,
2286
2286
minzoom : minzoom || 0 ,
2287
- maxzoom : maxzoom || 22
2287
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1
2288
2288
} ) ;
2289
2289
if ( addToMap ) {
2290
2290
this . _addLayerSucceeded ( { layerInfo, features } ) ;
@@ -2491,7 +2491,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
2491
2491
paint : layerStyle . style ,
2492
2492
layout : layerStyle . layout || { } ,
2493
2493
minzoom : minzoom || 0 ,
2494
- maxzoom : maxzoom || 22
2494
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1
2495
2495
} ;
2496
2496
if ( filter ) {
2497
2497
style . filter = filter ;
@@ -2506,7 +2506,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
2506
2506
parentLayerId,
2507
2507
visibility = true ,
2508
2508
minzoom = 0 ,
2509
- maxzoom = 22 ,
2509
+ maxzoom,
2510
2510
isIserver = false ,
2511
2511
tileSize = 256 ,
2512
2512
bounds
@@ -2515,7 +2515,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
2515
2515
type : 'raster' ,
2516
2516
tiles : url ,
2517
2517
minzoom : minzoom || 0 ,
2518
- maxzoom : maxzoom || 22 ,
2518
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1 ,
2519
2519
tileSize : isIserver ? this . rasterTileSize : tileSize ,
2520
2520
rasterSource : isIserver ? 'iserver' : '' ,
2521
2521
prjCoordSys :
@@ -2538,7 +2538,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
2538
2538
type : 'raster' ,
2539
2539
source : sourceId ,
2540
2540
minzoom : minzoom || 0 ,
2541
- maxzoom : maxzoom || 22 ,
2541
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1 ,
2542
2542
layout : {
2543
2543
visibility : this . _getVisibility ( visibility )
2544
2544
}
@@ -2713,7 +2713,7 @@ export function createWebMapV2Extending(SuperClass, { MapManager, mapRepo, crsMa
2713
2713
visibility : layerInfo . visible ? 'visible' : 'none'
2714
2714
} ,
2715
2715
minzoom : minzoom || 0 ,
2716
- maxzoom : maxzoom || 22
2716
+ maxzoom : maxzoom || this . map . getMaxZoom ( ) + 1
2717
2717
} ) ;
2718
2718
this . _addLayerSucceeded ( ) ;
2719
2719
}
0 commit comments