File tree 1 file changed +3
-7
lines changed
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -1343,17 +1343,13 @@ export class WebMap extends Observable {
1343
1343
if ( mapBounds ) {
1344
1344
return mapBounds ;
1345
1345
}
1346
- const getBoundsByResoutions = ( maxResolution , origin ) => {
1347
- const size = maxResolution * tileSize ;
1348
- return [ origin [ 0 ] , origin [ 1 ] - size , origin [ 0 ] + size , origin [ 1 ] ] ;
1349
- } ;
1350
-
1351
1346
if ( resolutions ) {
1352
1347
const maxResolution = resolutions . sort ( ( a , b ) => b - a ) [ 0 ] ;
1353
- return getBoundsByResoutions ( maxResolution , origin ) ;
1348
+ const size = maxResolution * tileSize ;
1349
+ return [ origin [ 0 ] , origin [ 1 ] - size , origin [ 0 ] + size , origin [ 1 ] ] ;
1354
1350
}
1355
1351
// 兼容之前的3857全球剖分
1356
- if ( this . baseProjection === 'EPSG:3857' ) {
1352
+ if ( this . baseProjection == 'EPSG:3857' ) {
1357
1353
return [ - 20037508.3427892 , - 20037508.3427892 , 20037508.3427892 , 20037508.3427892 ] ;
1358
1354
}
1359
1355
}
You can’t perform that action at this time.
0 commit comments