Perform selections on WMS layers using Styled Layer Descriptor (SLD)
OpenLayers.
|
Perform selections on WMS layers using Styled Layer Descriptor (SLD) |
Properties | |
events | {OpenLayers.Events} Events instance for listeners and triggering control specific events. |
clearOnDeactivate | {Boolean} Should the selection be cleared when the control is deactivated. |
layers | {Array(OpenLayers.Layer.WMS)} The WMS layers this control will work on. |
selectionSymbolizer | {Object} Determines the styling of the selected objects. |
layerOptions | {Object} The options to apply to the selection layer, by default the selection layer will be kept out of the layer switcher. |
handlerOptions | {Object} Used to set non-default properties on the control’s handler |
sketchStyle | {<OpenLayers.Style>|Object} Style or symbolizer to use for the sketch handler. |
wfsCache | {Object} Cache to use for storing parsed results from <OpenLayers.Format.WFSDescribeFeatureType.read>. |
layerCache | {Object} Cache to use for storing references to the selection layers. |
Constructor | |
OpenLayers.
|
Create a new control for selecting features in WMS layers using Styled Layer Descriptor (SLD). |
Functions | |
destroy | Take care of things that are not handled in superclass. |
activate | Activate the control. |
deactivate | Deactivate the control. |
setLayers | Set the layers on which the selection should be performed. |
{OpenLayers.Events} Events instance for listeners and triggering control specific events.
control.events.register(type, obj, listener);
selected | Triggered when a selection occurs. Listeners receive an event with filters and layer properties. Filters will be an array of OpenLayers.Filter objects created in order to perform the particular selection. |
{Array(OpenLayers.Layer.WMS)} The WMS layers this control will work on.
{<OpenLayers.Style>|Object} Style or symbolizer to use for the sketch handler. The recommended way of styling the sketch layer, however, is to configure an OpenLayers.StyleMap in the layerOptions of the handlerOptions:
new OpenLayers.Control.SLDSelect(OpenLayers.Handler.Path, { handlerOptions: { layerOptions: { styleMap: new OpenLayers.StyleMap({ "default": {strokeColor: "yellow"} }) } } });
{Object} Cache to use for storing references to the selection layers. Normally each source layer will have exactly 1 selection layer of type OpenLayers.Layer.WMS. If not provided, layers will be cached on the prototype. Note that if clearOnDeactivate is true, the layer will no longer be cached after deactivating the control.
Create a new control for selecting features in WMS layers using Styled Layer Descriptor (SLD).
handler | {OpenLayers.Class} A sketch handler class. This determines the type of selection, e.g. box (OpenLayers.Handler.Box), point (OpenLayers.Handler.Point), path (OpenLayers.Handler.Path) or polygon (OpenLayers.Handler.Polygon) selection. To use circle type selection, use OpenLayers.Handler.RegularPolygon and pass the number of desired sides (e.g. 40) as “sides” property to the handlerOptions. |
options | {Object} An object containing all configuration properties for the control. |
layers | Array({OpenLayers.Layer.WMS}) The layers to perform the selection on. |
setLayers: function( layers )
Set the layers on which the selection should be performed. Call the setLayers method if the layer(s) to be used change and the same control should be used on a new set of layers. If the control is already active, it will be active after the new set of layers is set.
layers | {Array(OpenLayers.Layer.WMS)} The new set of layers on which the selection should be performed. |
Take care of things that are not handled in superclass.
destroy: function()
Activate the control.
activate: function()
Deactivate the control.
deactivate: function()
Set the layers on which the selection should be performed.
setLayers: function( layers )