antvis / LarkMap

A React toolkit for geospatial visualization based on L7.

Home Page:https://larkmap.antv.antgroup.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🐛 [BUG]ChoroplethLayer中文本的位置不太正常

hsp-sz opened this issue · comments

🐛 Bug description [Please make everyone to understand it]

缩略之后,名字文本都跑到了边界线了。再看看山东省的,直接跑到海里面了
image

Please provide a link by forking these links LarkMap or GitHub repo, a minimal reproduction.

  • Required Link to minimal reproduction:

📷 Step to reproduce

🏞 Expected result

🚑 Any additional [like screenshots]

  • LarkMap Version:
  • Platform:

可自行指定行政的经纬度点

image

https://larkmap.antv.antgroup.com/components/layers/composite-layers/choropleth-layer#labelposition

问题是这个描述写的 默认几何中心点,你们这个默认几何中心点算得也不对啊。我这个issue提的意思不是说让我去指定,而是让你们去修复这个算的不正确的中心点。

对于不规则的多边形,几何中心点,自然不在“中心”,靠计算都不理想,比如河北,包围了北京,中心点都跑北京了,比如甘肃省,都跑外面去了,广东省的范围有沿海地区,中心点自动不在陆地,山东有海上小岛等等。行政省会点位的标记,按照地图制图合格性来说,行政名称必须标记实际的行政地理点位。对于合格行政地图的绘制,都是数据里面带有行政点位的,不是靠计算得来的。

image
这个也合理是吗?