Map Region Labels
Overview
Each region on a map can have a label, labels can be configured for all defined or undefined regions, certain series of map regions or certain region.
You can use custom text formatting, configure visual apperance of the labels and define special modes for maps - when label should be displayed (as it is not always possible to place all labels on a map).
Labels Display Modes
There are four map labels display modes:
Mode | Description |
---|---|
Always | Shows all region labels no matter are they overlapped or not. Useful when you have only a few labels and want to show them for sure. |
NonOverlap | Checks if labels overlap each other and removes some of them. |
RegionBounds | Shows labels only when labels can be displayed within region bounds, usefull when you use zoom control. |
RegionBoundsNonOverlap | Shows all labesl that fit into the regions and then shows some more labels without overlapping. Allows to show more labels. |
Label display mode is set in <map_series> node using labels_display_mode attribute:
Lets take a look at the map of the USA with labels enabled for every state in different display modes:
<map_series labels_display_mode="Always"/>
<map_series labels_display_mode="RegionBounds"/>
<map_series labels_display_mode="NonOverlap"/>
<map_series labels_display_mode="RegionBoundsNonOverlap"/>
Custom Labels for Small Regions
Sometimes when region is very small, but it is important to show its label on a map. In this case you should use special <map_region_label> control, that allows you to place a label (like a Custom Label Control) and position it on a map as any other control (see Controls Positioning).
For example, we want to display a map of the USA and don't want to use zoom control to be able to click on Washington DC, Rhode Island, Delaware, New Jersey, Maryland and Connecticut. We just create a labels for them and place it on the left of the map:
Here they are, small, but visible on the map:
General Labels Configuration
General Map Labels Configuration is almost the same as for chart data labels: see Labels Styles, Text and Formatting Tutorial to learn how to configure visual style and format label text.
Map Special Keywords
You can use all point specific keywords, for example: {%YValue}, {%SeriesName}, etc. and all data that comes from .amap file like {REGION_ID}, {REGION_NAME}.