Skip to content

Commit

Permalink
[fix]sonar
Browse files Browse the repository at this point in the history
  • Loading branch information
luoxiao-supermap committed Jan 7, 2025
1 parent e03cdf9 commit 3c6b2a9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/openlayers/mapping/WebMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -1353,8 +1353,7 @@ export class WebMap extends Observable {
return getBoundsByResoutions(maxResolution, origin);
}
// 兼容之前的3857全球剖分
const projection = this.baseProjection;
if (projection === 'EPSG:3857') {
if (this.baseProjection === 'EPSG:3857') {
return [-20037508.3427892, -20037508.3427892, 20037508.3427892, 20037508.3427892];
}
}
Expand Down Expand Up @@ -1383,7 +1382,7 @@ export class WebMap extends Observable {
const extent = [-20037508.3427892, -20037508.3427892, 20037508.3427892, 20037508.3427892];
return olTilegrid.createXYZ({ extent });
} else {
new TileGrid({ origin, resolutions, tileSize });
return new TileGrid({ origin, resolutions, tileSize });
}
}
/**
Expand Down

0 comments on commit 3c6b2a9

Please sign in to comment.