Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Provides a means of displaying a legend, supporting both static legend images and dynamically generated legends.
The dynamic legends support map engines that generate bit map images, e.g. ArcIMS, and those that generate a hierarchy, e.g. ArcGIS Server and WMS.

There is a corresponding action that can be used to display the legend in a popup window.

ID

com.cohga.client.panel.legend

Sub-tags

Name

type

cardinality

description

label

String

0..1

Label to display in tab

mapEngine

string

0..n

Map engine(s) to use to generate the dynamic legends, all available map engines will be used if none specified

remove

list

0..1

List of layer ids, comma separated, to remove from the dynamic legends

showMode

'visible', 'all', 'checked'

0..1

What type of dynamic legend to generate, default is 'visible'. 'all' will display all layers regardness of their map visibility or toc state, 'visible' will only display layers that are currently displayed on the map, 'checked' will display only layers that are checked in the toc regardless of the map scale and visibility of the layer on the map

staticLegend

staticLegend

0..n

Static images to add to legend

StaticLegend Tag

Name

type

cardinality

description

url

String

1..1

URL of image to display

location

'top' or 'bottom'

0..1

Should the legend image be before the dynamic legends or after, defaults to 'top'

minScale

Number

0..1

Minimum scale range to display layer at

maxScale

Number

0..1

Maximum scale range to display layer at

Example

Display a legend using all map engines

<view id='com.cohga.client.panel.legend'>
        <label>Legend</label>
</view>

Display a legend using only a single map engine

<view id='com.cohga.client.panel.legend'>
        <label>Legend</label>
        <mapEngine>mapengine.vector</mapEngine>
</view>

Dynamically generate a legend for an single map engine and remove a couple of layers

<view id='com.cohga.client.panel.legend'>
        <label>Legend</label>
        <mapengine>mapengine.main</mapengine>
        <remove>hillshade,elevation</remove>
</view>

Dynamically generate a legend for an map engine and remove a couple of layers and add two static images on at the top and one at the bottom

<view id='com.cohga.client.panel.legend'>
        <label>Legend</label>
        <mapengine>mapengine.main</mapengine>
        <remove>hillshade,elevation</remove>
        <staticLegend url="http://server/images/markers.png"/>
        <staticLegend url="http://server/images/aerial.png" location='bottom'/>
</view>
  • No labels