antvis/G2

The issue has been closed
geojson取得的centroid点和高德地图里行政区域里的中心点不是同一个 #3575
Break-2020 posted onGitHub
- I have searched the issues of this repository and believe that this is not a duplicate.
Reproduction link
https://g2.antv.vision/zh/docs/manual/dataset/connector#geojson
Steps to reproduce
在高德地图输入一个区域,如达川区,对应的点是行政区所在的中心点(107.511985,31.196365)。而通过
dv.source(geojsonData, { type: 'GeoJSON', // 别名 geo / geojson });
这种方式取得的centroidX, centroidY 得到的是(107.41513947891403,31.11078512409564)。两者对应的不是一个位置。 请问如何能取到行政区域的中心点?看了代码好像这边并不能传什么参数去更改生成genjson中取得的中心点
Environment | Info |
---|---|
g2 | 4.1.24 |
System | 90.0.4430.93(正式版本) (64 位) |
Browser | Chrome |
<!-- generated by antv-issue-helper. DO NOT REMOVE -->