Versions Compared

Key

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

...

Code Block
xml
xml
linenumberstrue
<contextmenu>
        <item action="weave.toc.selectLayer">
                <text>Set Active</text>
        </item>
        <item action="weave.toc.clearSelection">
                <text>Clear Selection</text>
        </item>
        <item action="weave.toc.zoomSelection">
                <text>Zoom To Selection</text>
        </item>
        <item>-</item>
        <item action="weave.toc.zoomToMaxScale">
                <text>Zoom to the Maximum Scale</text>
        </item>
        <item action="weave.toc.zoomToMinScale">
                <text>Zoom to the Minimum Scale</text>
        </item>
        <item action="weave.toc.zoomToLayer">
                <text>Zoom to Layer</text>
        </item>
        <item action="weave.toc.checkAll"/>
        <item action="weave.toc.uncheckAll"/> 
        <item>-</item>
        <item action="weave.toc.openUrl">
                <text>Metadata</text>
                <external>true</external>
                <iconCls>icon-tag-green</iconCls>
                <layer label="Mineral Tenements"> <!-- use toc entry label to specify matching layer -->
                        <url><![CDATA[http://metadata.nre.vic.gov.au/metadata/anzlic_report.cfm?dataset_name=MINTEN]]></url>
                </layer>
              </item>
</contextmenu>
Code Block
languagexml
titleToC context menu with layer transparency slider examples
<contextmenu>
	  <layer id="l_property"> <!-- add slideruse toc entry id to allspecify mapmatching engineslayer -->
	<item action="weave.toc.layerTransparency"/>

	<!-- add slider to specified map engines -->
	<item action="weave.toc.layerTransparency">
		<mapEngines>
			<mapEngine>mapengine.raster</mapEngine>
		</mapEngines>
	</item>

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

The weave.toc.layerTransparency context menu item was added at 2.5.21.

You can also specify width and interval, either at the action level or the slider level, to specify the width of the slider and the movement interval of the slider.

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

...

                        <url><![CDATA[http://metadata.nre.vic.gov.au/metadata/anzlic_report.cfm?dataset_name=PROPERTY]]></url>
                </layer>
                <layer mapengine="nre" layer="roads"> <!-- use mapengine/layer id to specify matching layer -->
                        <url><![CDATA[http://metadata.nre.vic.gov.au/metadata/anzlic_report.cfm?dataset_name=ROADS]]></url>
                </layer>
                <url><![CDATA[http://metadata.nre.vic.gov.au/metadata/anzlic_report.cfm]]></url> <!-- optionally specify fallback for other layers not listed above -->
        </item>
</contextmenu>