Hide map images until zoomed in

Type tutorial

Showing a lot of markers on the map may render it cluttered beyond usability. This tutorial will show how you can easily specify custom zoom levels for each individual image to be shown at. The problem Say we have a map with a lot of images in a MapImageSeries: While not exactly “unusable”, still a […]

Retrieving latitude/longitude of map click

Type tutorial

This tutorial will show how we can retrieve latitude / longitude coordinates of a click on map. The task When user clicks or taps anywhere on the Map, we want to retrieve the geographical coordinates (latitude and longitude) of the target point. We also want to make something useful with it, say, placing a marker […]

Retrieving information of a clicked Map Object

Type tutorial

In this tutorial we’ve seen how we can zoom in on a clicked country. We’re going to build on that to retrieve information about clicked object. Base map As mentioned in the preamble, we’re going to be using a map, created in another tutorial. The “Zooming to a map area on click” tutorial explains how […]

Maps with separator lines

Type tutorial

Some maps, bundled with amCharts 4, such as “U.S. territories” come with built-in separator lines. This tutorial will explain how to enable and configure them. Maps with separators GeoJSON format, which we use for our maps, allows including not only areas (polygons), but also line information. They may be used for a variety of reasons, […]

Using custom map zoom settings for individual countries

Type tutorial

Our Map Chart allows zooming directly to a specific polygon (country). However, for some countries, automatically-calculated zoom settings might not cut it. This tutorial will explain how you can use Polygon series data to override default zoom settings with custom ones. The problem We can make the chart zoom to a specific country using zoomToMapObject() […]

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 […]