OpenLayers. Control. SelectFeature

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

Inherits from

Summary
Selects vector features from a given layer on click or hover.
{Boolean} Allow selection of multiple geometries
{Boolean} Select on mouse over and deselect on mouse out.
{Function} Optional function to be called when a feature is selected.
{Function} Optional function to be called when a feature is unselected.
{Array(String)} To restrict selecting to a limited set of geometry types, send a list of strings corresponding to the geometry class names.
{Object} The functions that are sent to the handler for callback
{Object} Hash of styles

Properties

multiple

{Boolean} Allow selection of multiple geometries

hover

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

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 handler 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.