Example of Territory Info Setup

The page below gives code for setting up territory in the JSON format. The code must be stored in XML file that stores map settings within the MapChart root item. The example requires a map layer with the ID Regions. The items dictionary must include descriptions of a font with the BlackFont identifier and a brush  with the GrayBrush identifier.

"MapTerritoryTranscript":

{

          "Width": "0",

          "Background": "#ffffffff",

          "BorderRadius": "0",

          "ParentLayer": "{Regions}",

          "BorderThickness": "1",

          "Left": "60",

          "SortingMode": "Asc",

          "TextWrapping": "NoWrap",

          "Top": "470",

          "Padding": "5 5 5 5",

          "Font": "{BlackFont}",

          "ColumnCount": "2",

          "Height": "0",

          "HighlightBrush": "{GrayBrush}",

          "BorderColor": "Red",

          "Margin": "0 0 0 0"

}

After executing the example the page will have territory info that contains names of the regions stored in the dictionary of map area names:

Region names are highlighted in gray on hover.

See also:

MapTerritoryTranscript Item