How to Create Layer Categories

This section explains how to organize layers into categories, which appear in the Layers window of the map (see figure below). Each category can contain up to nine levels of subcategories, composing a maximum of ten levels, although there is no limit for the total number of categories that can be created.

Categories are defined by LayerGroup nodes, entered at the beginning and end of the list of layers each category will contain. Subcategories are registered by entering additional LayerGroup nodes within a main LayerGroup, creating sublevels in the category structure.

The figure below represents an example of a category structure in the Layers window on the map.

 

 

The following XML sample would yield the structure in the image above. Note that numbers were added to the <Layer> parameter (used to register layers) to provide a clearer example, and that this should not be done in a real-case scenario.

<LayerGroup Id="maincategory" Name="Main Category">

 

  <Layer1>…</Layer1>

  <Layer2>…</Layer2>

  <Layer3>…</Layer3>

 

<LayerGroup Id="subcategory1" Name="Subcategory 1">
 

<Layer4>…</Layer4>

<Layer5>…</Layer5>

<Layer6>…</Layer6>

 

<LayerGroup Id="level2subcategory" Name="Level 2 Subcategory">
 

<Layer7>…</Layer7>

<Layer8>…</Layer8>

<Layer9>…</Layer9>

 

   </LayerGroup>

 

   </LayerGroup>

 
<LayerGroup Id="subcategory2" Name="Subcategory 2">
 

<Layer10>…</Layer10>

<Layer11>…</Layer11>

<Layer12>…</Layer12>

 

   </LayerGroup>

 

</LayerGroup>

 

In the XML structure of the LayerGroup node, the following parameters can be configured:

Parameter

Required?

Description

Id

Yes

Unique identifier for the category in the configuration. This value cannot be the same as any other category ID.

Name

Yes

Name of the category to be displayed in the Layers window in the interface.