Using regional maps

In additional to world and country maps, amCharts 5 geodata package comes with a set of specialized regional maps, such as second-level subdivisions (districts), e.g. counties. This tutorial will show how those can be used.

Pre-requisites

We're assuming, you have basic knowledge of how the map chart works, about its data loading, and series.

Please visit "Map chart" tutorial for more information.

Loading

Regional maps are located in their respective sub-directories, e.g. region/usa/*.

The global name of the regional map will reflect its sub-directory structure.

For example, congressional district map of Florida would load like this:

import am5geodata_region_usa_congressional2022_worldLow from "@amcharts/amcharts5-geodata/region/usa/congressional2022/flLow";
<script src="https://cdn.amcharts.com/lib/5/geodata/region/usa/congressional2022/worldLow.js"></script>

Available map sets

DirectoryGlobal variable nameComment
region/canadaam5_region_canada_*Counties of Canada
region/mexicoam5_region_mexico_*Counties of Mexico
region/usaam5_region_usa_*Counties of the USA
region/usa/congressionalam5_region_usa_congressional_*Congressional districts of the USA (117th congress)
region/usa/congressional2022am5_region_usa_congressional2022_*Congressional districts of the USA (118th congress)
region/worldam5_region_world_*Maps of various regions of the World, e.g. Europe

Country-specific map sets usually contain maps for each state/province as well as a single map of the whole country with all second-level subdivisions.

Examples

U.S. Congressional district map

See the Pen
U.S. Congressional Map
by amCharts team (@amcharts)
on CodePen.0

U.S. Congressional district drill-down map

See the Pen
U.S. Congressional district drill-down map
by amCharts team (@amcharts)
on CodePen.0

County map of Florida

See the Pen
County map of Florida
by amCharts team (@amcharts)
on CodePen.0

Map of Africa

See the Pen
Map of Africa
by amCharts team (@amcharts)
on CodePen.0

County map of Jalisco, Mexico

See the Pen
County map of Jalisco, Mexico
by amCharts team (@amcharts)
on CodePen.0

Posted in Uncategorized