...
Name | type | cardinality | description |
label | String | 0..1 | Label to display in tab |
image | image | 0..1 | Details about the a single static image to display |
mapengine | string | 0..1 | Map engine to use to generate the legend, base map engine will be used if not specified must be included if you want a dynamic legend |
remove | list | 0..1 | List of layer ids to remove from the dynamic legend |
staticLegend | staticLegend | 0..n | Static images to add to the end of a dynamic legend |
Image Tag
Name | type | cardinality | description |
src | String | 1..1 | URL of image to display |
width | Integer | 1..1 | The width of the 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 |
Example
Display a pre-generated legend image
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<view id='com.cohga.client.panel.legend'>
<label>Legend</label>
<mapengine>mapengine.vector</mapengine>
</view>
|
Dynamically generate a legend for an alternative map engine and remove a couple of layers
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<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
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<view id='com.cohga.client.panel.legend'>
<label>Legend</label>
<mapengine>mapengine.main</mapengine>
<remove>hillshade,elevation</remove>
<staticLegend url="http://server/images/aerial.png/>
<staticLegend url="http://server/images/markers.png/>
</view>
|