Versions Compared

Key

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

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#crs0..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 crs tags a map engine will report all the projections the WMS server says it supports. By adding one or more crs tag you can refine this list so that the map engine only includes those projections that you're actually interested in using (which helps to improve performance). 

tokens#tokens0..1Additional tokens to add to the request. The tokens available are dependent on the WMS server implementation and are generally used to support implementation specific extensions to the WMS specification.
legend#legend0..1Modify the legend. Available from 2.6.9.

layers

Sub-tags

Name

Type

Cardinality

layer

#layer

0..n

remove

#remove

0..1

...

NameTypeRequiredDefaultDescription
namestringyes
The name of the token
valuestringyes
The value of the token
legendOnlybooleanno

false if layer is empty

true if layer is not empty

Should this token only be applied to requests that are generating a legend
layerstringno
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
prefixstringno
Value to be prepended to the token value, since 2.6.7
infixstringnoorValue to be used to join multiple user attributes, since 2.6.7
suffixstringno
Value to be appended to the token value, since 2.6.7
defaultstringno
Value to be used if user attribute substitution does not provide a value, since 2.6.7

legend

Properties

Sub-tags

Name

Type

Cardinality

remove

#remove

0..1

Examples

Code Block
languagexml
titleFiltering layers to only include specific layers
<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
languagexml
titleAdding tokens
<wms:mapengine id="test">
  <url>http://server/wms/test</url>
  <tokens>
    <token name="VIEWPARAMS" value="${user.filter.status}" prefix="STATUS:" infix=","/>
    <token name="VIEWPARAMS" value="USER:${user.id}"/>
    <token name="BACKFILL" value="true" legendOnly="true" layer="ward,busroutes"/> <!-- BACKFILL will be true for ward and busroutes -->
    <token name="BACKFILL" value="false" legendOnly="true"/> <!-- BACKFILL will be false for any other layers -->
  </tokens>
</wms:mapengine>


Code Block
languagexml
titleRemove layers from the legend
<wms:mapengine id="test">
  <url>http://server/wms/test</url>
  <legend>
    <remove>
      <layer>mann:easetxt</layer>
      <layer>mann:house_numbers</layer>
    </remove>
  </legend>
</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.

...