The minimum setup required for a WMS map engine is the capabilities url for the service.
...
urn:com.cohga.server.map.wms#1.0
Tags
mapengine
Properties
Name | Type | Required | Description |
---|---|---|---|
id | string | yes | Unique identifier |
url | string | yes | The capabilities URL for the WMS service. You should not include the SERVICE, REQUEST or VERSION parameters in the URL, just use the base URL, these parameters will be added automatically based on the type of request that is being made. Note: WMS version 1.3.0 may be forced by including the URL VERSION parameter, however this is not recommended and Weave will use WMS version 1.1.1 by default. |
format | string | no | Default format that the map engine will request from the WMS server if one is not specified. |
transparent | boolean | no | Determines if the areas of the image that are not covered by spatial data are rendered as transparent or as a solid colour (as set by the background property). Enabling transparency requires an image format that supports it (jpeg and png24 do not). |
background | integer | no | The RGB value for the image background if transparency is not enabled, the default is #ffffff |
username | string | no | A username to connect to the server as. |
password | string | no | A password to connect to the server as. This should be encrypted using 'encrypt' at the osgi prompt. |
qgis | boolean | no | Force the map engine as to be treated as though it were QGis. Weave will try and figure out if the underlying WMS service is QGis and perform additional optimisations and expose additional capabilities if it is, but sometimes Weave might not be able to determine this correctly in which case you can set this property to true in the config and the map engine will be treated as though it were being served from QGis. Additionally if Weave is incorrectly guessing that a WMS service is QGis when it isn't you can set this property to false to disable the additional functionality. (Note: Weave does not automatically identify QGis 3.4 hence need to set qgis=true.) |
Sub-tags
Name | type | cardinality |
---|---|---|
layers | #layers | 0..1 |
sort | #sort | 0..1 |
styles | #style | 0..1 |
crs | #crs | 0..n |
layers
Sub-tags
Name | type | cardinality |
---|---|---|
layer | #layer | 0..n |
remove | #remove | 0..1 |
...
Info |
---|
You should include one remove tag or one or more layer tags, not both |
remove
Sub-tags
Name | type | cardinality |
---|---|---|
layer | #layer | 1..n |
sort
Properties
Name | Type | Required | Description |
---|---|---|---|
method | "firsttolast" or "lasttofirst" | no | Default is firsttolast. It specifies if the layer list specifies layers to be sorted from top to bottom or from bottom to top |
Sub-tags
Name | type | cardinality |
---|---|---|
layer | #layer | 2..n |
layer
Content
...
styles
Properties
None.
Sub-tags
Name | type | cardinality |
---|---|---|
style | #style | 1..n |
style
Properties
Name | Type | Required | Description |
---|---|---|---|
layer | string | yes | The id of the layer, from the map engine, to override the style for |
name | string | yes | The name of the style to use |
crs
Properties
Name | Type | Required | Description |
---|---|---|---|
force | boolean | no | Ensure the CRS is added to the list of available CRS's even if the underlying server doesn't indicate that it supports the EPSG code |
Content
The EPSG code of the coordinate reference system to add
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://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>
</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.
...