OpenLayers. Control. SelectFeature

Selects vector features from a given layer on click or hover.

Inherits from

Summary
OpenLayers. Control. SelectFeatureSelects vector features from a given layer on click or hover.
Properties
multiple{Boolean} Allow selection of multiple geometries.
clickout{Boolean} Unselect features when clicking outside any feature.
toggle{Boolean} Unselect a selected feature on click.
hover{Boolean} Select on mouse over and deselect on mouse out.
box{Boolean} Allow feature selection by drawing a box.
onSelect{Function} Optional function to be called when a feature is selected.
onUnselect{Function} Optional function to be called when a feature is unselected.
geometryTypes{Array(String)} To restrict selecting to a limited set of geometry types, send a list of strings corresponding to the geometry class names.
callbacks{Object} The functions that are sent to the handlers.feature for callback
selectStyle{Object} Hash of styles
Constructor
<OpenLayers. Control. SelectFeature>

Properties

multiple

{Boolean} Allow selection of multiple geometries.  Default is false.

clickout

{Boolean} Unselect features when clicking outside any feature.  Default is true.

toggle

{Boolean} Unselect a selected feature on click.  Default is false.  Only has meaning if hover is false.

hover

{Boolean} Select on mouse over and deselect on mouse out.  If true, this ignores clicks and only listens to mouse moves.

box

{Boolean} Allow feature selection by drawing a box.

onSelect

{Function} Optional function to be called when a feature is selected.  The function should expect to be called with a feature.

onUnselect

{Function} Optional function to be called when a feature is unselected.  The function should expect to be called with a feature.

geometryTypes

{Array(String)} To restrict selecting to a limited set of geometry types, send a list of strings corresponding to the geometry class names.

callbacks

{Object} The functions that are sent to the handlers.feature for callback

selectStyle

{Object} Hash of styles

Constructor

<OpenLayers. Control. SelectFeature>

Parameters

layer{OpenLayers.Layer.Vector}
options{Object}
Controls affect the display or behavior of the map.
Instances of OpenLayers.Layer.Vector are used to render vector data from a variety of sources.
Close