Moxi Media Inc.
<WMS-LAYER> Tree View | Discussion Forum

IMF Developer's Guide » Map Configuration » <WMS-LAYER>  

The <WMS-LAYER> element is used to set layer properties, such as display and reporting capabilities and user control settings. Although the main purpose of a WMS layer is for drawing a map and simple identify queries, a WMS layer can be associated to a layer in a WFS service to extend its queryability using attributes set in the <WMS-LAYER> element. The attributes to support WFS queries will be added in v1.1.0.

Frequency Parent Elements (this element is valid within):
PR+ <LAYERS>
   

wfs-srs The spatial reference system code that defines the projection of this layer. Each layer in a WFS can use a different projection, so it needs to be defined here. The SRS used must be one of the ones defined in the <SRS-LIST> element, example "EPSG:4326". Required if this layer uses an associated WFS layer.

Attributes Description
active-identify Sets the layer to be the default identify layer when the application starts. Valid values are "true" or "false". The default is "false". Only one layer should be designated as active, but if more than one layer contains a true value, the last layer processed will be the active one. Optional.
can-drill-identify Sets whether the layer appears on the drill identify report. Valid values are "true" or "false". Optional, the default is "true" if the layer is queryable.
can-edit Sets whether the layer is editable. Valid values are "true" or "false". Optional, the default is "false". A layer must have an associated WFS-T layer to be editable.
can-identify Sets whether a layer can be identified. Valid values are "true" or "false". Layers that cannot be identified do not have the identify icon beside them in the layers list. Optional. the default is "true" for queryable layers.
can-select Sets whether a layer can be selected. Valid values are "true" or "false". Optional. the default is "false". A layer must have an associated WFS layer to be selectable.
can-set-visibility Sets whether a layer can be turned on and off by the user. Valid values are "true" or "false". Layers that have can-set-visibility set to "false" show up in the layers list with the visibility checkbox disabled (grayed out). Optional, defaults to "true".
can-set-visibility-beyond-scale Sets whether a layer can be turned on and off by the user if it is outside of the visible scale range. Valid values are "true" or "false". Optional, defaults to "false".
can-snap-to Sets whether a layer can be used as a snap layer when using the editing tools. Valid values are "true" or "false". Optional. the default is "false". A layer must have an associated WFS layer to be able to snap to it.
geometry-type Sets the geometry type of the layer, for use in editing and selection routines. Valid values are "line", "point", "polygon", "multiline", "multipoint", or "multipolygon". Optional, but required if the layer is used for editing or snapping to.
highlight-color The color of the graphics shown when highlighting selected features from this layer. Colors are specified in red, green, blue values between 0 and 255, separated by commas with no white space, example "255,0,0" is red. Optional, the background will be yellow "255,255,0" if features are selected and this attribute is not specified in your map configuration file.
highlight-width The width of the highlighted point graphic or the highlighted line graphic that is used to show highlighted selected features from this layer. The value is to be specified in points. Optional, defaults will be used if this attribute is missing.
identify-handler The name of a URL that is executed when the records have been located. Required for all identify types except "default".
identify-handler-key-fields A list of fields used in the "urlAppendFieldValue", "urlInsertFieldValue", "urlTable", and "urlMultipleFieldValues" identify types. The field names in the text string should be separated by spaces. Required for the above identify types.
identify-handler-suffix When using the "urlInsertFieldValue" identify type, a URL is constructed by adding the content of a spatial record's field to the handler URL, then adding the suffix contained in this attribute. Required for the "urlInsertFieldValue" identify type only.
identify-handler-type The type of identify process that this layer uses. Valid values are "default", "urlAppendFieldValue", "urlInsertFieldValue", "urlTable", and "urlMultipleFieldValues" Optional. The default is "default".
identify-popup Sets whether the identify results for a layer are shown in a separate browser window. The default is "false" which means that the results are shown in the data frame. Valid values are "true" or "false". Optional.
identify-service-type An indicator of whether to use WMS or WFS for the basic identify query routines. Valid values are "WMS" and "WFS". Optional. The default is "WMS" if this attribute is missing, or if there is no associated WFS layer.
identify-tolerance-pixels The search tolerance in pixels used when identifying features using the WFS method. Optional. The default value of 3 is used unless this is specified. It is suggested that the tolerance be set to "0" for polygon layers, and to "5" or less for line and point layers.
immediate-refresh An indicator of whether the map in the IMF viewer should automatically refresh when this layer's visibility is changed by the user. Valid values are "true" or "false". Optional, defaults to "false".
labels-wms-layer-name The name of a layer in the same WMS service as this layer that can be used to label features. If you have a separate layer containing labels, this setting can be used to control the visibility of the layers by using an icon after the layer name in the layers list. Optional.
labels-wms-style-name The name of a style for a layer in the same WMS service as this layer that can be used to label features. If you have a separate layer containing labels, this setting can be used to control the style of the label layer. Optional, defaults to "".
labels-wms-visible An indicator of whether the label layer defined in the labels-wms-layer-name attribute is visible when the layer is first displayed in the IMF viewer. Optional, defaults to "false".
legend-url The URL to a legend graphic image for this layer. Optional.
maximum-scale Sets the maximum scale at which the layer will be displayed. Use numeric values, for example to set the scale to 1:10000, use 10000. Optional.
metadata-url Sets the URL for a metadata page that describes the layer. Optional.
minimum-scale Sets the minimum scale at which the layer will be displayed. Use numeric values, for example to set the scale to 1:10000, use 10000. Optional.
title A title that you assign for this layer for display in the layers list and elsewhere in the application. It need not be the same as the title of the layer in the WMS service. The title must be unique, not used by any other layers in the map. Required.
transparent An indicator of whether the is transparent. Used to flag OPAQUE layers. Not normally used. Optional, defaults to "true".
visible Sets the initial visibility of the layer. Valid values are "true" or "false". Optional, defaults to "false".
wfs-geometry-field-name The name of the field containing geometry in the WFS layer that is associated to this layer, as reported by the WFS DescribeFeatureType response from the WFS service. Required if a WFS layer supports this layer and spatial queries are done on it.
wfs-layer-name The name of the WFS layer that is associated to this layer, as reported by the WFS capabilities response. Usually, this will be the same name as the layer's WMS name. Required if a WFS layer supports this layer.
wfs-service-id The service ID of the WFS service providing query support for this layer. The service id must match one of the service-id values in a WFS-SERVICE element.
wms-layer-name The name of the layer in the WMS service, as reported by the capabilities response from the WMS service. Required.
wms-queryable An indicator that the layer is queryable using the WMS service. This attribute should be set to "true" if the capabilities response for the layer reports queryable="1". If "true", the application will use the WMS for simple "identify" queries. If "false" and WFS support is available, the application will use the WFS for those queries. Valid values are "true" or "false". Optional, defaults to "false".
wms-service-id The service ID of the WMS service providing this layer. The service id must match one of the service-id values in a WMS-SERVICE element.
wms-style The name of a style for displaying the layer in the WMS service, as reported by the capabilities response from the WMS service. Some WMS layers are available in a number of styles. Required if the layer has styles, ignored if a styled layer descriptor is defined for the WMS service.
   

Frequency Child Elements
O+ <FIELD>
O+ <IDENTIFY-LINK>
O+ <PROPERTY>
   

Frequency Description (in this context)
O+ The child element may appear one or more times within a <WMS-LAYER> element.
PR+ The <WMS-LAYER> element must appear one or more times within the <LAYERS> element.