Named Group Layer
Overview
A named group layer combines a set of named layers as one named layer. You can combine a set of layers that are related to each other based on certain properties under one group. For example, individual layers that represent Primary Schools, Secondary Schools, and Colleges can be grouped as one named group layer called Educational Institute. The named group layer can be used as a layer while creating a map definition and can be rendered using a Render Map request. You can also obtain legends for named group layers (for example, by using the getNamedMapLegends function) and describe them using the describeNamedLayer function.
Example
This is an example of a named layer definition that contains a named group layer.
In this example, the definition defines the attributes of a LayerGroup named WorldGroupLayer.
<?xml version="1.0" encoding="UTF-8"?>
<NamedLayer version="MXP_NamedResource_1_5" xmlns="http://www.mapinfo.com/mxp" >
<ConnectionSet />
<DataSourceDefinitionSet />
<LayerGroup id="id3" name="WorldGroupLayer" alias="GroupLayerWithNamedLayers">
<LayerList>
<NamedLayerRef name="Grid" resourceID="/Samples/NamedLayers/Grid15FeatureLayer"/>
<NamedLayerRef name="World" resourceID="/Samples/NamedLayers/WorldFeatureLayer"/>
<NamedLayerRef name="Ocean" resourceID="/Samples/NamedLayers/OceanFeatureLayer"/>
</LayerList>
</LayerGroup>
</NamedLayer>