Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geojson取得的centroid点和高德地图里行政区域里的中心点不是同一个 #3575

Closed
1 task done
Break-2020 opened this issue Aug 17, 2021 · 1 comment
Closed
1 task done

Comments

@Break-2020
Copy link

Break-2020 commented Aug 17, 2021

  • 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中取得的中心点

image

Environment Info
g2 4.1.24
System 90.0.4430.93(正式版本) (64 位)
Browser Chrome
@hustcc
Copy link
Member

hustcc commented Sep 30, 2021

这个是 geo 数据上的问题。好像没有很好的解决办法。

@hustcc hustcc closed this as completed Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants