...
Refining the layer a map engine exposes
It's possible that you want to make use of a map engine that contains dozens or even hundreds of layers where you actually only want to expose only a handful of those layers to Weave, for example if you have a WMS map service that's provided by a government department and covers the entire country but you only want to make use of the layers that cover your particular state (assuming the WMS service exposes separate layers for separate states), or if you have a map service that exposes both vector and raster based layers but you're rather split them up in Weave so you have two separate Weave map engine, one that's just vector layers and one that's just raster.
You can do this one of two ways in Weave, depending on it being easier to remove the layers you don't want or if it's easier to include just the layers that you do want. If you want to only list the layers to include in the final map engine you can add a layers
tag to the map engine that has one or more individual layer
tags within for each layer that you want to include, alternatively if you want to remove layers you'd add a remove
tag between the layers
and layer
tags, e.g.
Drawing map selections
Note |
---|
The following information about drawing selections is now obsolete. |
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<wms:mapengine id="test">
...
<selection>false</selection>
</wms:mapengine>
|
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<wms:mapengine id="test">
...
<selection>
<maxscale>50000</maxscale>
</selection>
</wns:mapengine>
|
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<wms:mapengine id="test">
...
<selection>
<limit>5000</limit>
<timeout>5</timeout>
</selection>
</wms:mapengine>
|
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<wms:mapengine id="test">
...
<selection>
<antialiasing>false</antialiasing>
</selection>
</wms:mapengine>
|
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<wms:mapengine id="test">
...
<selection>
<batchsize>2500</batchsize>
</selection>
</wms:mapengine>
|
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<wms:mapengine id="test">
...
<selection>
<reuse>true</reuse>
</selection>
</wms:mapengine>
|
...
selection
Properties
None
Sub-tags
Name | Type | Cardinality |
point | urn:point | 0..1 |
line | urn:line | 0..1 |
polygon | urn:polygon | 0..1 |
Content
None
point
Properties
None
Sub-tags
Name | Type | Cardinality |
active | urn:active | 0..1 |
inactive | urn:inactive | 0..1 |
Content
None
line
Properties
None
Sub-tags
Name | Type | Cardinality |
active | urn:active | 0..1 |
inactive | urn:inactive | 0..1 |
Content
None
polygon
Properties
None
Sub-tags
Name | Type | Cardinality |
active | urn:active | 0..1 |
inactive | urn:inactive | 0..1 |
Content
None
active/inactive
Properties
Name | Type | Required | Description |
strokecolour | colour | no | The colour of the line to draw lines |
strokewidth | number | no | The width of the lines to draw |
strokeopacity | number (0-1) | no | The opacity of the lines drawn |
fillcolour | colour | no | The colour used when filling selections |
fillopactiy | number (0-1) | no | The opacity used when filling selections |
mark | 'square', 'circle', 'triangle', 'star', 'cross' or 'x' | no | The type of marker to draw point selections with |
marksize | number | no | The size of the marker used to draw point selections |
markrotation | number (0-360) | no | The angle of rotation use to draw point selection markers with |
markopactiy | number (0-1) | no | The opacity of point selection markers |
Sub-tags
None
Content
None
Notes
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<wms:mapengine id="test">
...
<selection>
<point>
<active>
<strokecolour>white</strokecolour>
<strokewidth>1</strokewidth>
<strokeopacity>0</strokeopacity>
<fillcolour>cyan</fillcolour>
<fillopacity>1</fillopacity>
<mark>circle</mark>
<marksize>12</marksize>
</active>
<inactive>
<strokecolour>cyan</strokecolour>
<strokewidth>2</strokewidth>
<strokeopacity>1</strokeopacity>
<fillcolour>white</fillcolour>
<fillopacity>0</fillopacity>
<mark>circle</mark>
<marksize>12</marksize>
</inactive>
</point>
<line>
<active>
<strokecolour>cyan</strokecolour>
<strokewidth>3</strokewidth>
<strokeopacity>0.75</strokeopacity>
</active>
<inactive>
<strokecolour>#00ffff</strokecolour>
<strokewidth>2</strokewidth>
<strokeopacity>0.25</strokeopacity>
</inactive>
</line>
<polygon>
<active>
<strokecolour>#00ffff</strokecolour>
<strokewidth>3</strokewidth>
<strokeopacity>0.75</strokeopacity>
<fillcolour>#00ffff</fillcolour>
<fillopacity>0.125</fillopacity>
</active>
<inactive>
<strokecolour>#00ffff</strokecolour>
<strokewidth>2</strokewidth>
<strokeopacity>0.25</strokeopacity>
<fillcolour>#00ffff</fillcolour>
<fillopacity>0.025</fillopacity>
</inactive>
</polygon>
</selection>
</wms:mapengine>
|
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<wms:mapengine id="raster">
<url>http://vmrunout:8080/geoserver/wms</url>
<format>image/jpg</format>
<transparent>false</transparent>
<selection>false</selection> <!-- disable selections -->
</wms:mapengine>
<arcims:mapengine id="vector">
<host>vmfadeout</host>
<service>Vector</service>
<format>image/png8</format>
<selection>false</selection> <!-- disable selections -->
</arcims:mapengine>
<!-- new map engine based on 'Vector' map service -->
<arcims:mapengine id="selection">
<host>vmfadeout</host>
<service>Vector</service>
<format>image/png8</format>
<transparent>true</transparent> <!-- obviously we need a transparent image -->
<selection>
<reuse>true</reuse> <!-- this may need to be false if you get a black background -->
<!-- include any other selection options here -->
</selection>
<layers> <!-- filter layers so underlying map engine doesn't actually have any layers so will never draw anything -->
<layer>dummy</layer>
</layers>
</arcims:mapengine>
|
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<client:config id="...">
...
<view id="com.cohga.html.client.map.mapView">
...
<mapengine id="raster">
....
</mapengine>
<mapengine id="vector">
....
</mapengine>
</mapengine id="selection">
<options>
<selection>true</selection> <!-- tell the client map engine that this layer is for handing selections -->
<alpha>true</alpha>
<!-- include any other options here -->
</options>
</mapengine>
</view>
</client:config>
|
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<toc:model id="toc.manningham">
<mapengine>vector</mapengine>
<entry label="Selection" exclusive="true">
<!-- use the selection map engine for every entry in here -->
<mapengine>selection</mapengine>
<entry layer="_selection.active" label="Active" checked="true"/>
<entry layer="_selection.all" label="All" checked="false"/>
<entry label="Selected" checked="false">
<!-- individual selection layer here -->
...
</entry>
</entry>
<!-- regular layer entries here -->
...
<entry label="Raster" exclusive="true">
<!-- use the raster map engine for every entry in here -->
<mapengine>raster</mapengine>
...
</entry>
</toc:model>
|
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<client:config id="...">
...
<view id="com.cohga.html.client.map.mapView">
<control id="com.cohga.client.mapctrl.attribution"/>
...
<mapengine id="raster">
....
</mapengine>
<mapengine id="vector">
<attribution>Copyright(c) 2010</attribution>
....
</mapengine>
</view>
</client:config>
|