Location-Sensitive Map
This is a demo of dynamically loading a local map based on the viewer’s location.
Key implementation details
In this demo we determine the viewer’s country by their IP address and then dynamically load a map for that country using the net.load helper utility.
Related tutorials
Build this chart with AI
The prompt below can be used to build this chart with AI. For best coding results, use the most advanced AI models, like Claude Opus 4.6 and GPT-5.3-Codex. For more info and tips, check out amCharts AI docs.
Create a location-sensitive map that dynamically loads geographic data based on the viewer's country detected via IP geolocation. Assign random numeric values to each region and display them as a choropleth map with a color gradient from light blue to dark blue. Include a vertical color legend with 'Lowest' and 'Highest' labels. Apply an olive-green hover color. Show region name tooltips. For US viewers, use the Albers USA projection; for other countries, use a standard flat map with a country title label. Enable rotate and pan controls. Apply smooth transition animations. Use amCharts 5 library.
Demo source