Rotate Globe to a Selected Country
One of the cool features of amCharts Maps is that you can display the world map as a globe. This, however, means that not all countries are in view all the time. This demo shows how to rotate the globe to a country.
Click on any country for the globe to center it.
Key implementation details
When the country polygon becomes selected (active
) we get its geometric center with geoCentroid()
and then animate the map chart to the latitude/longitude of that point.