Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 20 Next »

At least one Map Engine must be setup for the server to be able to generate and display map images for the client.

The map engine configuration is different depending upon which map engine you are connecting to.

Weave currently supports three external map engines:

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, but you should use only on of those methods and not both. 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.

Include only two layers from a map engine
<wms:mapengine id="test">
    ...
    <layers>
        <layer>sa_temp_2012</layer>
        <layer>sa_temp_2016</layer>
    </layers>
</wms:mapengine>
Remove four layers from a map engine
<wms:mapengine id="test">
    ...
    <layers>
        <remove>
            <layer>nt_temp_2012</layer>
            <layer>wa_temp_2012</layer>
            <layer>nt_temp_2016</layer>
            <layer>wa_temp_2016</layer>
        </remove>
    </layers>
</wms:mapengine>

Note that as of Weave 2.5.20 it's possible to specify a wildcard using * for the layer id's, e.g.

<wms:mapengine id="test">
    ...
    <layers>
        <remove>
            <layer>nt_temp_*</layer>
            <layer>wa_temp_*</layer>
        </remove>
    </layers>
</wms:mapengine>

Attribution (Watermark)

To display a text overlay on the map you can add an attribution (e.g. Watermark) control to the map then include an attribution property for one of your client map engines.

Adding attribution to the map view
    <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">
                ....
                <options>

                    <attribution>Copyright(c) 2010</attribution>
                    ....
                </options>
            </mapengine>
        </view>
    </client:config>
  • No labels