• Open in:

Day and Night World Map

Seeing the visual representation of the time of day in various places in the world could be a very useful aid in business, tourism, and other areas. This demo shows you how to implement the day/night view with amCharts Maps.

Key implementation details

The sun is just a circle bullet on a MapPointSeries that we position using the open source calculation functions available here. The “night” is just 3 overlayed “geo circles” (circles defined by geographic coordinates with radius in degrees). We use 3 circles with different radii to create the transitional twilight area. The center of the circles is position on the exactly opposed side of the world to the sun position.

Related tutorials

Demo source