The minimum setup required for a WMS map engine is the capabilities URL for the service.
...
Name | Type | Cardinality | Description |
---|---|---|---|
layers | #layers | 0..1 | Refine what layers are included in the map description. |
sort | #sort | 0..1 | |
styles | #style | 0..1 | |
crs | #crs | 0..n | Refine what CRSs the map engine lists as being supported, as opposed to including all of them (as there might be thousands of CRSs that the WMS server says that it supports). Without any |
tokens | #tokens | 0..1 | Additional tokens to add to the request |
layers
Sub-tags
Name | Type | Cardinality |
---|---|---|
layer | #layer | 0..n |
remove | #remove | 0..1 |
...
The EPSG code of the coordinate reference system to add
Examples
...
title | Filtering layers to only include specific layers |
---|
...
tokens
Tokens provide a way for the administrator to include additional parameters in the URL sent to the WMS server
Properties
Name | Type | Required | Default | Description |
---|---|---|---|---|
tokenJoinDelimiter | string | no | ; | value to use to join multiple tokens with the same name, since 2.6.7 |
Sub-tags
Name | Type | Cardinality |
---|---|---|
token | #token | 1..n |
token
Properties
Name | Type | Required | Default | Description |
---|---|---|---|---|
name | string | yes | The name of the token | |
value | string | yes | The value of the token | |
legendOnly | boolean | no | false if layer is empty true if layer is not empty | Should this token only be applied to requests that are generating a legend |
layer | string | no | Comma separated list of layer id's for which this token should be included, can be used to further restrict when the token is sent, and allows for different tokens to be sent for different layers. Only applies if legendOnly is true | |
prefix | string | no | Value to be prepended to the token value, since 2.6.7 | |
infix | string | no | or | Value to be used to join multiple user attributes, since 2.6.7 |
suffix | string | no | Value to be appended to the token value, since 2.6.7 | |
default | string | no | Value to be used if user attribute substitution does not provide a value, since 2.6.7 |
Examples
Code Block | ||||
---|---|---|---|---|
| ||||
<wms:mapengine id="test">
<url>http://server/wms/test</url>
<layers>
<layer>point1</layer>
<layer>point2</layer>
<layer>line1</layer>
<layer>line2</layer>
<layer>polygon1</layer>
<layer>polygon2</layer>
</layers>
</wms:mapengine>
|
Code Block | ||||
---|---|---|---|---|
| ||||
<wms:mapengine id="test">
<url>http://server/wms/test</url>
<layers>
<remove>
<layer>point2</layer>
<layer>line2</layer>
<layer>polygon2</layer>
</remove>
</layers>
</wms:mapengine>
|
Code Block | ||||
---|---|---|---|---|
| ||||
<wms:mapengine id="test">
<url>http://server/wms/test</url>
<sort>
<layer>point1</layer>
<layer>point2</layer>
<layer>line1</layer>
<layer>line2</layer>
<layer>polygon1</layer>
<layer>polygon2</layer>
</sort>
</wms:mapengine>
|
Code Block | ||||
---|---|---|---|---|
| ||||
<wms:mapengine id="test"> <url>http://server/wms/test</url> <sort method='lasttofirst'> <layer>photo</layer> </layers>sort> </wms:mapengine> |
Code Block | ||||
---|---|---|---|---|
| ||||
<wms:mapengine id="test"> <url>http://server/wms/test</url> <layers><styles> <remove><style <layer>point2</layer>layer="property" name="bw_property"/> <style <layer>line2</layer> <layer>polygon2</layer> </remove>layer="road" name="bw_road"/> </layers>styles> </wms:mapengine> |
Code Block | ||||
---|---|---|---|---|
| ||||
<wms:mapengine id="test"> <url>http://server/wms/test</url> <sort> <layer>point1</layer> <layer>point2</layer> <layer>line1</layer> <layer>line2</layer> <layer>polygon1</layer> <layer>polygon2</layer> </sort><url>http://username:password@server/wms/test</url> </wms:mapengine> |
Code Block | |||||
---|---|---|---|---|---|
| |||||
<wms:mapengine id="test"> <url>http://server/wms/test</url> url> <sort method='lasttofirst'> <crs>EPSG:4326</crs> <layer>photo</layer><crs>EPSG:28355</crs> <<crs>EPSG:3857</sort>crs> </wms:mapengine> |
Code Block | ||||
---|---|---|---|---|
| ||||
<wms:mapengine id="test"> <url>http://server/wms/test</url> <tokens> <styles> <token name="VIEWPARAMS" <style layer="property" name="bw_propertyvalue="${user.filter.status}" prefix="STATUS:" infix=","/> <style<token layername="roadVIEWPARAMS" namevalue="bw_road"/> </styles> </wms:mapengine> |
Code Block | ||
---|---|---|
| ||
<wms:mapengine id="test">
<url>http://username:password@server/wms/test</url>
</wms:mapengine>
|
Code Block | ||
---|---|---|
| ||
<wms:mapengine id="test"> <url>http://server/wms/test</url> <crs>EPSG:4326</crs> <crs>EPSG:28355</crs> <crs>EPSG:3857</crs>USER:${user.id}"/> <token name="RULELABEL" value="false" legendOnly="true"/> <token name="RULELABEL" value="true" layer="ward,busroutes"/> </tokens> </wms:mapengine> |
Note |
---|
As of version 1.3.7 of the WMS bundle, the password can be encrypted using the OSGi encrypt command. |
WMS 1.3.0
Don't "upgrade" to WMS 1.3.0 unless you really have to.
Version 2.15.16 of the com.cohga.server.map.wms
bundle (released as part of Weave 2.5.21) improves support for WMS 1.3.0 by supporting map services that require their axis order to be swapped.
...