Moxi Media Inc.
<layers-script> Discussion Forum

IMF Developer's Guide » Site Configuration » <layers-script>  

The <layers-script> element is used to override the core IMF script used to display the layers list and to set some of the options for the default layer script. The layers script is called automatically by the map when it refreshes, usually calling the core script imfLayers.jsp. This element allows you to specify an alternate script that is refreshed in the same way without changing the scripts that call the layers script.

Note: The name of the layers script defined in your button or tab that opens the layers page should match the value of the url specified in this element. See example below.

Frequency Parent Elements (the <layers-script> element is valid within):
POS1 <site-config>
   

Frequency Description (in this context)
POS1 The <layers-script> element may appear once in the <site-config> element in the specified sequence.
   

Attributes Description
url The URL of the alternate layer script. The URL can contain the special variable $FRAMEWORK to specify that the document is relative to the IMF installation directory. Absolute URLs may also be used. URLs that don't start with http: or $FRAMEWORK are resolved relative to the location of the XML file. Optional, defaults to "$FRAMEWORK/imfLayers.jsp".
auto-refresh Sets the initial setting of the "Automatically refresh map" checkbox if auto refresh is enabled. Valid values are "true" or "false". Optional, default is "false".
show-auto-refresh Sets the visibility of the "Automatically refresh map" checkbox on the layer list page. Valid values are "true" or "false". Optional, default is "true".
show-version Sets the visibility of the IMF version number at the bottom of the layer list page. Valid values are "true" or "false". Optional, default is "true".
   

Examples:

<!-- Use a different layer script -->
<layers-script url="$FRAMEWORK/ext/test/layers.jsp" />
...
<tab name="Layers"
     url="$FRAMEWORK/ext/test/layers.jsp"
     target="dataFrame"
     hint="Set Layers"
     status="Set which layers display, and choose an identify layer."
     help="$FRAMEWORK/ext/test/help_layers.txt"
     graphic="$FRAMEWORK/tabs/bc/layers53x27.gif"
     width="53" height="27"/>

<!-- Just change some options of imfLayers.jsp -->
<layers-script show-auto-refresh="false" show-version="false"/>