Attaching data to a map
Overview
AnyChart allows you to attach any data to a map, using XML configuration files, this data can contain numeric and text information that can be formatted and used in map tooltips, labels, legend or actions. In this tutorial you will learn how to attach you data to maps and how to use them.
We suppose that you've already studied at least How to create Simple Map tutorial and Map Architecture tutorial
To attach data to a map, you have to choose the map, locate the required amap file and create XML settings file, that tells AnyChart to render certain map (i.e. use certain ".amap" file), the same XML file can contain data to be attached to a map regions.
Simple values
The most easy way to attach value to region is to create series of "MapRegions" type and specify y attribute that will contain numerical value (for example sales amount or region population):
Now, when this data is attached you can show the map and use this values, for example - in labels (read more about labels and tooltips configuration in Labels and Tooltips tutorial):
Here is a sample of a map of Africa in Eckert1 projection with population values attached and labels shown:

Values attached to regions can be used for automatic coloring using thresholds - read more about this in Thresholds Tutorial
Custom Attributes (Meta Data/Additional Data)
You can attach not only simple numerical values to regions, but any number of custom data fields - both of numerical and text type. You should use point attributes for this.
Below we will show the map of United Kingdom and attach four custom data fields to each region, these fields will contain Population, Area (in sq miles), GDP (in trillions of USD) and Patron Saint name. Look at sample XML settings that attach this information to England region:
Now, when this data is attached you can show the map and use this values, for example - in tooltips, labels will show only the names of regions (read more about labels and tooltips configuration in Labels and Tooltips tutorial):
Here is a sample of a map of UK map in Robinson projection with custom fields attached, labels and tooltips shown (launch live preview to see tooltips):

Custom fields attached to regions can be used for automatic coloring using thresholds - read more about this in Thresholds Tutorial