wiki:MapServerLayerConfiguration

Version 2 (modified by jbirch, 16 years ago) ( diff )

--

MapServer Layer and Legend Configuration

You can greatly enhance your users' experience by using MapServer's layer METADATA to control how Fusion interacts with the layers, especially in the legend widget.

Legend Root Node

The name associated with the root node of the legend (by default "new node") is controlled by a metadata element in the WEB section called legend_title. Example:

WEB
  METADATA
    "legend_title"  "My Cool Map"     
  END
END

Layer Behavior

These metadata values control how individual layers are presented and dealt with during selection.

displayInLegend "true|false"

By default, all layers are shown in the legend. If set to false, it will hide the layer in the legend.
expandInLegend "true|false"

By default, all classified layers will show a sub-branch in the legend with all the classes. If set to false then the sub-branch is initially collapsed
legendLabel "string value"

By default, the layer's NAME value is used in the legend. If this metadata is set, then the value will be used in the legend instead.
selectable "true|false"

By default, layers are not 'selectable' using the select widget. If this is set to 'true' then the layer will be considered 'selectable' so the select widget will be enabled when this layer is selected in the legend.

Group Behavior

The legend will create folders for each group and put the appropriate layers in those groups. The groups respond to the following metadata in the first LAYER object in the group (first layer to use the group name)

groupLegendLabel "string value"

By default, the group name is used as the legend label. If this metadata is set then the value will be used instead of the group name.
groupDisplayInLegend "true|false"

By default, all groups are displayed in the legend. Setting this to false will hide the group in the legend (and all layers that are part of that group too).
groupExpandInLegend "true|false"

By default, groups initially start expanded to show the layers in that group. Setting this to false will start the group off 'collapsed'.
Note: See TracWiki for help on using the wiki.