Moxi Media Inc.
<legend-script> Discussion Forum
IMF Developer's Guide » Site Configuration » <legend-script>  

The <legend-script> element is used to override the core IMF script used to display the legend. The legend script is called automatically by the map when it refreshes, usually calling the core script imfLegend.jsp. This element allows you to specify an alternate script or static document that is refreshed in the same way without changing the scripts that call the legend script.

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

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

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

Attributes Description
url The URL of the alternate legend script or static document. 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.
   

Example:

<legend-script url="$IMF/ext/test/legend.jsp" />
...
<tab name="Legend"
     url="$IMF/ext/test/legend.jsp"
     target="dataFrame"
     hint="Display map legend"
     status="Display the map legend."
     help="$IMF/ext/test/help_legend.txt"
     graphic="$IMF/tabs/bc/legend56x27.gif"
     width="56" height="27"/>

Valid HTML 4.01!