Skip to content

Commit 193f29a

Browse files
[fix]sonar
1 parent 93ef8f3 commit 193f29a

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/openlayers/mapping/WebMap.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy