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).

to top

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:

XML Syntax
Plain code
01 <map_series labels_display_mode="Always" />

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"/>

Live Sample:  Map Labels Display mode sample always

to top

<map_series labels_display_mode="RegionBounds"/>

Live Sample:  Map Labels Display mode sample region bounds

to top

<map_series labels_display_mode="NonOverlap"/>

Live Sample:  Map Labels Display mode sample nonoverlap

to top

<map_series labels_display_mode="RegionBoundsNonOverlap"/>

Live Sample:  Map Labels Display mode sample RegionBoundsNonOverlap

to top

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:

XML Syntax
Plain code
01 <controls>
02   <map_region_label enabled="true" position="right" align="near" link="RI" />
03   <map_region_label enabled="true" position="right" align="near" link="DE" />
04   <map_region_label enabled="true" position="right" align="near" link="DC" />
05   <map_region_label enabled="true" position="right" align="near" link="NJ" />
06   <map_region_label enabled="true" position="right" align="near" link="MD" />
07   <map_region_label enabled="true" position="right" align="near" link="CT" />
08 </controls>

Here they are, small, but visible on the map:

Live Sample:  Map Custom Region Labels

to top

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}.

 

 

to top