Versions Compared

Key

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

...

Name

Type

Required

Default

Description

id

string

yes


Unique identifier for this map engine

spatialengine

string

urn:com.cohga.server.spatial.geotools#1.0


The spatial engine that will be providing the data

format

string

yes


What image format the map engine will support

layers

#layer

yes


A list of the layers that this map engine will provide

styles

#style

yes


A list of the styles that can be used to display a layer.

Alternatively this can point to an external SLD file

legend

#legend

no

Alter the legend display

layer

Properties

Name

Type

Cardinality

Description

id

string

1..1

The unique id of the layer

label

string

1..1

The user visible label for the label

layer

string

1..1

The layer, within the spatial engine, that this layer will use

style

#style

1..1

The style that this layer should be displayed with

...

See the section below on inline styles for information on how the styles are defined.

...

legend

Alter the display of the legend

Properties

None

Sub-tags

Name

Type

Cardinality

remove

#remove

0..1

Content

None

remove

Properties

None

Sub-tags

Name

Type

Cardinality

layer

#layer

0..n

Content

None

layer

Properties

Name

Type

Required

Description

id

number

no

The id of the layer to match

name

string

no

The name of the layer to match

Sub-tags

None

Examples

Example Weave map engine
Code Block
languagexml
<?xml version="1.0" encoding="UTF-8"?>

<config xmlns="urn:com.cohga.server.config#1.0" xmlns:weave="urn:com.cohga.server.map.weave#1.0">

	<weave:mapengine id="vector">
		<spatialengine>gis</spatialengine>
		<format>image/png32</format>
		<layers>
			<layer id="contours01" label="Contours 1m" layer="GIS.CONTOURS_01M" style="contour"/>
			<layer id="contours02" label="Contours 2m" layer="GIS.CONTOURS_02M" style="contour"/>
			<layer id="contours05" label="Contours 5m" layer="GIS.CONTOURS_05M" style="contour"/>
			<layer id="contours10" label="Contours 10m" layer="GIS.CONTOURS_10M" style="contour"/>
		</layers>
		<styles>
			<style id="contour">
				<type>line</type>
				<stroke-color>#853111</stroke-color>
				<stroke-width>2</stroke-width>
			</style>
		</styles>
	</weave:mapengine>

</config>

...

Using an external SLD file to style a layer
Code Block
languagexml
			<layer id="contours01" label="Contours 1m" layer="GIS.CONTOURS_01M" style="sld\contours.sld"/>

...

Alternatively, when referring to an external SLD file it can also be specified in the style itself, rather than the layer, so the layer can reference one of the inline styles, and the style then points to the external SLD file, e.g.

Code Block
languagexml
		<styles>
			<style id="contour">sld\contours.sld</style>
		</styles>

This way if you use the same SLD file for multiple layers you can just reference a single inline style and have that style refer to the SLD file.

...