Moxi Media Inc.
<PROPERTY> Tree View | Discussion Forum
IMF Developer's Guide » Site Configuration » <PROPERTY>  

The <PROPERTY> element is used in the <SITE-CONFIG> element to initialize a programmer defined property to the parent object within the XML configuration process. The property value can be retrieved from within a script as follows:

String value = conf.getProperty("propertyGroup","propertyName");

Properties are also used to set the options for many of the core IMF scripts. The options that are set with property elements are listed at the bottom of this page.

Frequency Parent Elements (this element is valid within):
PO+ <SITE-CONFIG>
   

Attributes Description
group The group that the property belongs to. A group can contain only one property with a given name, but properties named the same can appear in different groups. Required.
name The identifier of the property. Required.
value The text value of the property. Required.
   

Frequency Description (in this context)
PO+ The <PROPERTY> element is optional, and may appear one or more times within the <SITE-CONFIG> element.
   

Example of setting properties, and how to retrieve them in a JSP script:

<PROPERTY group="user" name="login" value="jill" />
<PROPERTY group="user" name="password" value="secret" />

String user = conf.getProperty("user", "login");
String pass = conf.getProperty("user", "password");
Properties used to set core IMF script options:

Sets the drill down identify tool to show information from layers that are not visible.

<PROPERTY group="drill" name="show-invisible" value="true" />

Sets the drill down identify tool to show information from layers that are beyond their scale thresholds.

<PROPERTY group="drill" name="show-beyond-threshold" value="true" />

Sets the drill down identify tool to show the "no records found" message from layers that have no data found.

<PROPERTY group="drill" name="show-empty" value="true" />

Sets the coordinate display projections for the drill down identify and identify tools. The values should be separated by spaces, and must be included in the map configuration SRS-LIST section to actually appear on your report. If this property is not set, coordinates will not display on your report.

<PROPERTY group="identify" name="coordinates" value="EPSG:42102 EPSG:4269" />

Sets the drill down identify and identify tools to not show the "show geometry" message from layers that have geometry returned with the query response.

<PROPERTY group="identify" name="show-geometry" value="false" />

Sets the drill down identify and identify tools to not show the "zoom to extent of this feature" message from layers that have geometry returned with the query response.

<PROPERTY group="identify" name="show-zoom-extent" value="false" />

Sets an alternate index map script, used internally to refresh the index map when the map extent changes. This should match the URL of the index map tab or tool, except shouldn't have a path. Optional, not required in most cases. The default is "imfIndexMap.jsp".

<PROPERTY group="indexmap" name="url" value="imfIndexMap.jsp" />

Sets the layers list to show the "auto refresh" option. The checkbox is shown if this property is not set to false. The inital setting of the checkbox can also be set. It defaults to false.

<PROPERTY group="layers" name="show-auto-refresh" value="true" />

Sets the initial setting of the auto refresh checkbox if the above option is used.

<PROPERTY group="layers" name="auto-refresh" value="false" />

Sets the layers list to show the "feedback" link that sends mail to the address listed. The feedback link is not shown if this property is not set.

<PROPERTY group="layers" name="feedback-email" value="doug@moximedia.com" />

Sets an alternate layers script, used internally to refresh the layers list when the map extent changes. This should match the URL of the layers tab, except shouldn't have a path. Optional, not required in most cases. The default is "imfLayers.jsp".

<PROPERTY group="layers" name="url" value="imfLayers.jsp" />

Sets an alternate legend script, used internally to refresh the legend when the map extent changes. This should match the URL of the legend tab, except shouldn't have a path. Optional, not required in most cases. The default is "imfLegend.jsp".

<PROPERTY group="legend" name="url" value="imfLegend.jsp" />

Sets the script used to display real-time coordinates as the user moves the mouse over the map. The coordinate is not shown if this property is not set.

<PROPERTY group="map" name="coordinate-script" value="imfCoordinatesMapUnits.js" />

Sets an alternate main map script, used internally to create and refresh the map. The script name shouldn't have a path. Optional, not required in most cases. The default is "imfMainMap.jsp".

<PROPERTY group="map" name="url" value="imfMainMap.jsp" />

Specifies the units of the measure tool. Valid values are "metric" or "imperial". If this property is not set, the area will be shown in metric units.

<PROPERTY group="measure" name="distance-units" value="metric" />

Specifies the units of the measure area tool. Valid values are "metric" or "imperial". If this property is not set, the area will be shown in metric units.

<PROPERTY group="measure" name="area-units" value="metric" />

Sets an alternate status script, used internally to refresh the status when the map extent or active tool changes. This script shouldn't have a path. Optional, not required in most cases. The default is "imfStatus.jsp".

<PROPERTY group="status" name="url" value="imfStatus.jsp" />

Valid HTML 4.01!