Skip to content

Commit

Permalink
Merge pull request #221 from hahaha-zsq/dev
Browse files Browse the repository at this point in the history
fix:修改高德地图比较版本号在1.4.15出现报错的问题
  • Loading branch information
sakitam-fdd authored Jul 1, 2024
2 parents 42183b5 + 3b5dc57 commit bf11d21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/amap/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ class AMapWind {
_getBounds() {
let [southWest, northEast] = [undefined, undefined];
const bounds = this.map.getBounds();
if (compareVersion(AMap.version, '2.0') >= 0) {
if (compareVersion(AMap?.version ?? AMap.v, '2.0') >= 0) {
// FIX: 高德地图3D模式和2D模式,map.getBounds接口已统一
northEast = bounds.getNorthEast(); // xmax ymax
southWest = bounds.getSouthWest(); // xmin ymin
Expand Down

0 comments on commit bf11d21

Please sign in to comment.