ALOV logo

DOCUMENTATION

The legend indicates to the user how various features are represented on map. The legend indicates the current state of layer: visibility, out of ranges, out of zoom. It allows to control layers and renderers visibility. The layer or renderer entry in legend may be hidden permanently or temporarily.

The legend appearance defined both in layout and project file. In layout file it is declared by object with type="legend"

<object type="legend" name="my_legend" bounds="0,52,300,120" align="client"/>

Note on attribute name. Applet may have several legends with the different list of layers. Name allows to distribute layers among legends. See "legend" attribute for layer.

Besides backcolor and forecolor attributes which describe colours for background and text, the layout entry for legend may have the following attributes:

ATTRIBUTEDESRIPTION
select_clr heighlight colour for active layer
disabled_clrdisabled layer
err_colorlayer that can't be loaded
net_colorheighlight colour for layer that is downloading
separatordefines whether layers in legend will be separated with thin line
selectionwhether to use select_clr for active layer
font_boldfont for layer labels
font_plainfont for other labels
The attributes below refers to images which describes the state of layer.
image_clocklayer is out of time ranges
image_zoomincurrent map's zoom is less than layer's min zoom range
image_zoomoutcurrent map's zoom is more than layer's max zoom range
image_networklayer data is downloading
image_outextcurrent map extent is out of layer's extent
image_keypassword for layer is not resolved

The objects in project file: layer; renderer and symbol have the attributes which describe their behavior in the legend. All of them have:

showlegend - determines the visibility of object in legend

label - label in legend. If it is not defined, name is utilized. Name is unique object identifier, in contrast to label. Label may be diffretent for different languages.

<layer name="Cities" label="Cities of USA"> <label xml:lang="fr">Les villes des Etats-Unis</label> ....
ATTRIBUTEDESRIPTION
legendthe name of legend component this layer is represented. Applet may have several legends with the different list of layers
legendexpandedwhether to expanded the item on map startup
hidelegend_zoomwhether to hide the layer item if layer is out of zoom ranges
WrapLayerTitleswhether to wrap labels in legend
legendsymbolshapelist of coordinates that allows to define your own shape for legend icon
legtypetype of shape 1 - point, 2- line, 3- polyogon

Besides, if layer's attribute alwaysvisible is true, the checkbox in legend which allows to set layer's visibility will be hidden.

The renderer object may have the attribute AllowOnOffInLegend. It enables the visibility of checkbox for renderer as well as for layer.

previous  top next


© ALOV 2002-2005 contact6 at alov.org