Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Name

type

cardinality

description

label

String

0..1

Label to display in tab

image

image

0..1

Details about a single static image to display

mapengine

string

0..1 n

Map engine(s) to use to generate the legend, must be included if you want a dynamic legend dynamic legends, all available map engines will be used if none specified

remove

list

0..1

List of layer ids to remove from the dynamic legend legends

staticLegend

staticLegend

0..n

Static images to add to the end of a dynamic legend

...

StaticLegend Tag

Name

type

cardinality

description

src url

String

1..1

URL of image to display

width

Integer

1 location

'top' or 'bottom'

0..1

The width of Should the legend image pointed to by the above URL

height

Integer

1..1

The height of the image pointed to by the above URL

StaticLegend Tag

Name

type

cardinality

description

url

String

1..1

URL of image to display be before the dynamic legends or after, defaults to 'top'

Example

Display a pre-generated legend imagelegend using all map engines

Code Block
xml
xml
linenumberstrue
<view id='com.cohga.client.panel.legend'>
        <label>Legend</label>
        <image>
                <src>http://gissrv/igis/images/legend.png</src>
                <width>123</width>
                <height>864</height>
        </image>
</view>

Dynamically generate Display a legend using only a single map engine

Code Block
xml
xml
linenumberstrue
<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

...

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

Code Block
xml
xml
linenumberstrue
<view id='com.cohga.client.panel.legend'>
        <label>Legend</label>
        <mapengine>mapengine.main</mapengine>
        <remove>hillshade,elevation</remove>
        <staticLegend url="http://server/images/aerialmarkers.png"/>
        <staticLegend url="http://server/images/markersaerial.png" location='bottom'/>
</view>