Custom polygons on Map Chart

Type tutorial

If you are working with Map Chart, you’re probably already familiar with MapPolygonSeries thatr get their geographical data from loaded map file, or “geodata”. However, Map polygons are not limited to this source of data. You can draw any shape and polygon on the map using in-line lat/long coordinates. This tutorial will show how. The […]

Pre-zooming Map to a Country

Type tutorial

You can pre-zoom the map to certain coordinates and level. If you don’t want to do that, you can make the chart pre-zoom to a particular country. This tutorial will explain how. Zooming to country The Map chart has a dedicated method for zooming to a polygon (country) of our choice: zoomToMapObject(object). The name leaves […]

Configuring Small Map

Type tutorial

This quick tutorial will show you how to configure appearance of the Small map control. What is a Small map? Small map is a control that shows a bird’s eye view on the whole map, indicating current zoomed in viewport. Please refer to this section in Map chart article on how to enable it. Just […]

Adding “Home” Button to Map Chart

Type tutorial

Map Chart can be zoomed and panned. There is, however, no built-in “go home” button. This tutorial will show how to add one which resets map’s zoom and position to initial state. Base map Let’s use this very basic map as our test subject. We can pan the map by dragging with a mouse or […]

Using U.S. county maps

Type tutorial

You might have not known that the geodata package for Map Chart includes not only country maps, but also detailed county maps for all U.S. states. Using county maps The county map files are located under region/usa subdirectory of the geodata package. If you are not familiar with the geodata package and how maps are loaded […]

Setting initial zoom and position of a Map chart

Type tutorial

The Map will always start off fully zoomed out and centered. However, in some cases, you might want to start the map pre-zoomed to some place. This tutorial aims to explain how to do just that. The task We want a world map. However, we want it to start pre-zoomed to Europe. Finding zoom level […]

Map with Orthographic (globe) projection

Type tutorial

This short tutorial will show how you can create a Globe out of your map using Orthographic projection. Setting projection As you may already know, each map can be displayed in a number of ways – projections. (more about it here) Each one has it’s own advantages and disadvantages. However, only one can be used […]

Highlight all polygons in Map Series on hover

Type tutorial

This tutorial will show how you can highlight all of the polygons in the same series, when just one of those is hovered. Prerequisites States and events The solution explained in this tutorial relies heavily on two amCharts 4 concepts: States and Event listeners. Make sure you’re familiar with both of the those (linked above). […]

Zooming to map area on click

Type tutorial

This tutorial will show how you can set up your map to automatically zoom to an area (i.e. country) when user clicks on or taps it. As you may be already aware if you got to this point, each area on the chart is configured using MapPolygonSeries template. This task is no different – we’ll be […]

Resetting Map Position/Zoom

Type tutorial

All Map Charts, unless disabled, can be panned and zoomed. This tutorial will explain how to reset map’s position and zoom to its original state via custom button or API. Resetting via API Easy way Map chart provides a dedicated goHome(duration) method. I wish it had a youredrunk parameter, but it only accepts a duration in milliseconds […]