Versions Compared

Key

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

...

com.cohga.html.client.main.tocView

weave.toc

Sub-tags

...

Name

type

cardinality

default

description

label

String

0..1


Label to display in tab

location

String

1..1


Which region to add the view to

toolbar

toolbar 

0..1


A toolbar of items to appear at the top of the view

statusbar

statusbar 

0..1


A toolbar of items to appear at the bottom of the view

contextmenu

contextmenu 

0..1


a right-click context menu

checkParentOnVisible

boolean

0..1

false

Should the parent group also be turned on when a layer is turned on

.The default is false

?

turnOnActive

boolean

0..1

false

Should the associated layer be turned on when the active entity is changed?

The default is false.

Only available since 2.5.26

allowExclusiveOff

boolean

0..1

true < 2.6.5

false >= 2.6.5

Should it be possible to turn off the active child in an exclusive

toc

ToC group?

Prior to 2.6.5 the default was true, 2.6.5 and layer the default is false.

Only available since 2.6.6 and 2.6.5.2

activateEntity

boolean

0..1

false

Should the associated entity

by

be set active when the layer is turned on?

The default is false.

Only available since 2.6.6

showFilterIcon

boolean

0..1

false

Should a filter icon indicator be displayed for layers that are currently filtered?

Only available since 2.6.6

...

showEntitySize

boolean

0..1

true

Should the count of the number of selected entities be shown.
This only applies for toc entries that have been associated with an entity.


Example ToC view

...

with all available items
Code Block
languagexml
<view id="com.cohga.html.client.map.tocView">
	<label>Layers</label>
	<location>west</location>
	<toolbar>
		<item action="weave.toc.expandAll"/>
		<item action="weave.toc.collapseAll"/>
		<item action="weave.toc.save"/>
		<item action="weave.toc.load"/>
		<item>-&gt;</item>
		<item action="weave.toc.favourites"/>
		<item component="weave.toc.filter"/>
	</toolbar>
	<contextmenu>
		<item action="weave.toc.styleLayer"/>
		<item action="weave.toc.selectLayer"/>
		<item action="weave.toc.zoomToLayer"/>
		<item action="weave.toc.zoomSelection"/>
		<item action="weave.toc.zoomToMinScale"/>
		<item action="weave.toc.zoomToMaxScale"/>
		<item action="weave.toc.clearSelection"/>
		<item action="weave.toc.lockLayer"/>
		<item action="weave.toc.favourite"/>
		<item action="weave.toc.checkAll"/>
		<item action="weave.toc.uncheckAll"/>
		<item action="weave.toc.filterLayer"/>
		<item action="weave.toc.selectAll"/>
	</contextmenu>
</view>

Toolbar and statusbar status bar Items

Code Block
weave.toc.expandAll

Expands all the groups/folders within the ToC view.

Code Block
weave.toc.collapseAll

Collapses all the groups/folders within the ToC view.

Code Block
weave.toc.save

Saves the current ToC state so it can later be restored, note that only a single ToC state can be saved at once, using the save button will replace the currently saved ToC state.

Code Block
weave.toc.load

Load the previously saved ToC state.

Code Block
weave.toc.filter

Refine the layers listed in the ToC.

Code Block
weave.toc.favourites

Toggle the display of just the favourite layers, i.e. those that have been marked as favourites using the weave.toc.favourite action list below. Available from 2.6.5.

Context Menu Items

Code Block
weave.toc.styleLayer

If the layer supports multiple styles then this allows the user to switch between the available styles.

Code Block
weave.toc.selectLayer

If the layer is associated with an entity this allows the user to change the active entity. Requires that the entity attribute is specified for the layer in the toc model.

Code Block
weave.toc.zoomToLayer

Changes the current map extent to match that of the layer.

Code Block
weave.toc.zoomSelection

If the layer is associated with an entity this allows the user to change the map view based on the extent of the current selection for that entity. Requires that the entity attribute is specified for the layer in the toc model.

Code Block
weave.toc.zoomToMinScale

Change the current map extent to match the minimum scale range for the layer (if a minimum scale for the layer can be determined by Weave).

Code Block
weave.toc.zoomToMaxScale

Change the current map extent to match the maximum scale range for the layer (if a maximum scale for the layer can be determined by Weave).

Code Block
weave.toc.clearSelection

If the layer is associated with an entity this allows the user to clear the selection for the entity. Requires that the entity attribute is specified for the layer in the toc model.

Code Block
weave.toc.lockLayer

If the layer is lockable this allows the user to toggle the state of the locking for the layer. A lockable layer is a layer that has the ability to disable the scale ranges that are applied to a layer's display, allowing a user to view the layer outside of its normal scale ranges. To create a lockable layer you need to duplicate the layer in the underlying map engine, rename the new layer to include UNLOCKED as a prefix and remove any scale ranges that are attached to the symbology for the new layer. Then when Weave attempts to display the layer in an unlocked state it will display the unlocked version of the layer rather than the original.

Note:

  • You should not include the unlocked version of the layer in the ToC model.

  • If the underlying layer name contains a colon (which some WMS map engines do) the UNLOCKED prefix should be after the colon, e.g. topp:property should use topp:UNLOCKEDproperty.

Code Block
weave.toc.checkAll

Allows you to check all child entries of a toc group with a single click.

Code Block
weave.toc.uncheckAll

Allows you to uncheck all child entries of a toc group with a single click.

Code Block
weave.toc.favourite

Mark a layer as a favourite, which would then be displayed if the user selects the weave.toc.favourites action listed above. Available from 2.6.5.

Code Block
weave.toc.filterLayer

Allow the user to filter the layer, note that the filter itself must be defined separately and only layers that have an associated filter will have this entry enabled. Available from 2.6.6. See Layer Filtering for more information.

Code Block
weave.toc.selectAll

Allow the user to select every everything from the entity associated with the toc entry, if there is an entity associated with the toc entry. Added at 2.6.9.

Layer Transparency Slider

The weave.toc.layerTransparency context menu item was added at 2.5.21, this item adds a new slider to the context menu allowing you to directly change the transparency of the underlying map engine. Note that the slider is attached to individual layers in the ToC panel but it changes the transparency for the entire map engine that the layer belongs to and not just the layer associated with the ToC entry.

You can either specify the mapEngine and slider settings within a mapEngines and sliders section, as in the example or specify them directly under the item.

...

Note that the tool currently only works on a layer entry in a ToC, and will not be available for a group, even if that group is set as not expandable. This has been resolved and will be available from 2.5.23.

...

add slider to all map engines
Code Block
languagexml
<contextmenu>
    <item action="weave.toc.layerTransparency"/>
</contextmenu>
Code Block
languagexml
title


add slider to specified map engines
title
Code Block
languagexml
<contextmenu>
    <item action="weave.toc.layerTransparency">
        <mapEngines>
            <mapEngine>mapengine.raster</mapEngine>
        </mapEngines>
    </item>
</contextmenu>
Code Block
languagexml


add slider to specified map engines and configure individual sliders
Code Block
languagexml
<contextmenu>
    <item action="weave.toc.layerTransparency">
        <sliders>
            <slider mapengine="mapengine.vector" value="70"/>
            <slider mapengine="mapengine.raster" value="30"/>
        </sliders>
    </item>
</contextmenu>

...