Fix: 高德地图坐标转换 (#1147)

* fix: d3 依赖版本ie 兼容问题

* chore: 经纬度转平面坐标方法
This commit is contained in:
@thinkinggis 2022-06-13 10:13:04 +08:00 committed by GitHub
parent 1663502b1d
commit 254aa6c349
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -381,8 +381,7 @@ export default class AMapService
};
}
public lngLatToContainer(lnglat: [number, number]): IPoint {
const ll = new AMap.LngLat(lnglat[0], lnglat[1]);
const pixel = this.map.lngLatToContainer(ll);
const pixel = this.map.lngLatToContainer(lnglat);
return {
x: pixel.getX(),
y: pixel.getY(),