Map projections determine how the spherical surface of Earth is transformed into a flat 2D representation. amCharts 5 supports multiple projection types through the D3-geo library.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/amcharts/amcharts5/llms.txt
Use this file to discover all available pages before exploring further.
Available Projections
amCharts 5 exports the following projection functions from D3-geo:geoMercator- The standard Mercator projectiongeoOrthographic- Globe-style orthographic projectiongeoEquirectangular- Simple equirectangular projectiongeoAlbersUsa- Composite projection for US mapsgeoEqualEarth- Equal-area pseudocylindrical projectiongeoNaturalEarth1- Compromise projection for world maps
Setting a Projection
Set the projection when creating a MapChart using theprojection setting:
Mercator Projection
The Mercator projection is the most common projection for web maps. It preserves angles but distorts size, especially near the poles.- General-purpose world maps
- Regional maps
- Navigation and route planning
Orthographic Projection
The orthographic projection creates a globe-like appearance, showing the Earth as it would appear from space.- Interactive globe visualizations
- Showing global data from a specific viewpoint
- Geographic data with rotation controls
With orthographic projection, use
panX: "rotateX" and panY: "rotateY" for proper globe rotation behavior.Equirectangular Projection
A simple projection that maps longitude and latitude directly to x and y coordinates.- Simple world maps
- Heat maps and data overlays
- When minimal distortion in the tropics is desired
Equal Earth Projection
An equal-area projection that maintains accurate relative sizes of countries and regions.- Thematic maps comparing countries by area
- Population or resource distribution maps
- When accurate size representation is important
Natural Earth Projection
A compromise projection balancing shape and area distortion.- World maps for general reference
- Physical and political maps
- When both shape and area need to be reasonably accurate
Albers USA Projection
A composite projection specifically designed for United States maps, with Alaska and Hawaii repositioned.- United States maps
- State-level data visualization
- US demographic or economic data
Animating Projection Changes
Available since version 5.16.0
animateProjection() method:
Projection Settings
Rotation
Control the center point and rotation of the map:Pan Behavior
Configure how dragging affects the map:"none"- No panning"translateX"/"translateY"- Move the map (for flat projections)"rotateX"/"rotateY"- Rotate the globe (for spherical projections)
Related Classes
- MapChart - The main map chart component
- Series Types - Different ways to display data on maps