File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 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 {
13431343 if ( mapBounds ) {
13441344 return mapBounds ;
13451345 }
1346- const getBoundsByResoutions = ( maxResolution , origin ) => {
1347- const size = maxResolution * tileSize ;
1348- return [ origin [ 0 ] , origin [ 1 ] - size , origin [ 0 ] + size , origin [ 1 ] ] ;
1349- } ;
1350-
13511346 if ( resolutions ) {
13521347 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 ] ] ;
13541350 }
13551351 // 兼容之前的3857全球剖分
1356- if ( this . baseProjection === 'EPSG:3857' ) {
1352+ if ( this . baseProjection == 'EPSG:3857' ) {
13571353 return [ - 20037508.3427892 , - 20037508.3427892 , 20037508.3427892 , 20037508.3427892 ] ;
13581354 }
13591355 }
You can’t perform that action at this time.
0 commit comments