简体   繁体   English

将美国各州与 AmMaps 中的 MapLines 连接起来而不指定坐标?

[英]Connecting U.S. States with MapLines in AmMaps without specifying coordinates?

I am retrieving signals from different cities in the US at different times and want to connect all of them with lines, however, I am not getting the exact coordinates of the signals.我正在不同时间从美国不同城市检索信号,并希望将所有信号与线路连接起来,但是,我没有获得信号的确切坐标。 Is this possible to substitute the coordinates with the State using AmCharts.AmMaps ?这是否可以使用AmCharts.AmMaps用 State 替换坐标?

No, lines require coordinates in AmMaps.不,线需要 AmMaps 中的坐标。 As an alternative, you can use getObjectById in conjunction with getAreaCenterLatitude and getAreaCenterLongitude to dynamically find out the lat/long center of an area and use those values.作为替代方案,您可以将getObjectByIdgetAreaCenterLatitudegetAreaCenterLongitude结合使用来动态找出区域的getAreaCenterLongitude中心并使用这些值。 Note that some states need some adjustments as their centers aren't exactly where you expect them.请注意,某些州需要进行一些调整,因为它们的中心并不完全符合您的预期。 You can see this override in action in this demo where labels are automatically generated but uses a lookup table with overrides for specific states.您可以在此演示中看到此覆盖的实际效果,其中标签是自动生成的,但使用具有针对特定状态的覆盖的查找表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM