Purpose
This function helps to enumerate a map's list of layers and can refer to both group and graphical layers.
Syntax
LayerListInfo( map_window_id, numeric_counter, attribute )
map_window_id is a Map window identifier.
numeric_counter is value from zero (0) to MAPPER_INFO_ALL_LAYERS, which is the number of layers in the Map window excluding the cosmetic layer. For details about MAPPER_INFO_ALL_LAYERS, see MapperInfo() function.
attribute is a code indicating the type of information to return; see table below.
Return Value
Depends on the attribute parameter.
Description
This function can be used to iterate over all the components of the map's layer list where numeric_counter goes from zero (0) to MAPPER_INFO_ALL_LAYERS.
The attributes are:
Value of window_id, attribute | ID | Description |
---|---|---|
LAYERLIST_INFO_TYPE | 1 | The type of layer in the list:
|
LAYERLIST_INFO_NAME | 2 | Returns a string value, which is the name of the layer or group layer. |
LAYERLIST_INFO_LAYER_ID | 3 | Returns a numeric value, Layer-ID of the layer. Use this value to query the layer further using the LayerInfo() function. |
LAYERLIST_INFO_GROUPLAYER_ID | 4 | Returns a numeric value, GroupLayer-ID of GroupLayer. Use this value to query the group layer further using the GroupLayerInfo function. |
If the type returns a graphical layer, then use LayerInfo to get attributes. If it is a group layer then use GroupLayerInfo to get attributes. To loop through this flattened view of the layer list, use MAPPER_INFO_ALL_LAYERS as the looping limit.
Specifying a map window ID of zero (0) returns information about the Cosmetic Layer.
See Also:
GroupLayerInfo function, LayerInfo() function, MapperInfo() function