You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "GoldWood2000 (via GitHub)" <gi...@apache.org> on 2024/01/19 01:29:34 UTC

[I] [Feature] 如何获取map中label的坐标 [echarts]

GoldWood2000 opened a new issue, #19525:
URL: https://github.com/apache/echarts/issues/19525

   ### What problem does this feature solve?
   
   例如在map渲染完成后,我如何获取此label的坐标
   ![image](https://github.com/apache/echarts/assets/52521162/caf22019-914c-4959-99c4-00dae017a5cd)
   
   
   ### What does the proposed API look like?
   
   获取map的label的坐标


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


Re: [I] [Feature] 如何获取map中label的坐标 [echarts]

Posted by "GoldWood2000 (via GitHub)" <gi...@apache.org>.
GoldWood2000 closed issue #19525: [Feature] 如何获取map中label的坐标
URL: https://github.com/apache/echarts/issues/19525


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


Re: [I] [Feature] 如何获取map中label的坐标 [echarts]

Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #19525:
URL: https://github.com/apache/echarts/issues/19525#issuecomment-1899529317

   It is hard to get the label positions from ECharts, and much easier to calculate them from the geoJson map file.
   The [official example](https://echarts.apache.org/examples/en/editor.html?c=map-HK) reads from [this geoJson](https://echarts.apache.org/examples/data/asset/geo/HK.json). The file has all provinces and their contour line coordinates. For each province you need to sum all latitude and longitude values separately and calculate their mean.  These two numbers will be the geographical center of the province, i.e. the province label position.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org