Purpose
This function returns information about a specific group layer in the map.
Syntax
GroupLayerInfo ( map_window_id, group_layer_id, attribute )
map_window_id is a Map window identifier.
group_layer_id is the number of a group layer in the Map window (for example, 1 for the top group layer) or a name of a group layer in the map. To determine the number of group layers in a Map window, call the MapperInfo( ) function.
attribute is a code indicating the type of information to return; see table below.
Return Value
Depends on the attribute parameter.
Description
The attributes are:
Value of window_id, attribute | ID | Description |
---|---|---|
GROUPLAYER_INFO_NAME | 1 | Returns a string value, which is the name of the group layer. |
GROUPLAYER_INFO_LAYERLIST_ID | 2 | Returns a numeric value, the ID of the group layer in the layer list (position of the group layer in the layer list). |
GROUPLAYER_INFO_DISPLAY | 3 | Returns the boolean value
|
GROUPLAYER_INFO_LAYERS | 4 | Returns the count of graphical layers in the group. It will ignore group layers but include all nested graphical layers. |
GROUPLAYER_INFO_ALL_LAYERS | 5 | Returns the count of layers and group layers (includes all nested layers and group layers). |
GROUPLAYER_INFO_TOPLEVEL_LAYERS | 6 | Returns the count of graphical or group layers at the top level of the group's layer list. |
GROUPLAYER_INFO_PARENT_GROUP_ID | 7 | Returns the group layer ID of the immediate group containing this group, will return zero (0) if group layer is in the top level list. |
Group layer ID's are from zero (0) to n, where n is the number of group layers in the list and zero (0) refers to top level, or "root" of the layer list. All the group layer info attributes will apply to the root of the list with the exception of GROUPLAYER_INFO_DISPLAY (3). GROUPLAYER_INFO_NAME (1) will return the map's name (same as its window title). The cosmetic layer will be included in any of the attributes that count graphical layers.
Specifying a map window ID of zero (0) returns the name of the map window, and returns the name of the Cosmetic Layer as "cosmetic1", "cosmetic2".
See Also:
LayerInfo( ) function, MapperInfo( ) function