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 $IMF 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 $IMF are resolved relative to the location of the XML file. Optional, defaults to "$IMF/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".
show-select-icon Sets whether the select icon displays on the layer list page. You need to have a tool named "Select" on your toolbar in order for this setting to have any effect. If you have a "Select" tool, and this attribute is set to false, the "i" icon in the layers list sets the active layer for both selection and identify routines. Valid values are "true" or "false". Optional, default is "true".
show-themes Sets whether the combo box containing theme names appears on layer list page. Valid values are "true" or "false". Optional, default is "false".
feedback-url The URL of the page used to provide user feedback. If this is true, and the email-address attribute of the <webmaster> element is defined, then the feedback link appears on the layer list page. The URL can contain the special variable $IMF 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 $IMF are resolved relative to the location of the XML file. Optional, defaults to "$IMF/imfFeedbackForm.jsp".
   

Examples:

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

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

Valid HTML 4.01!