Class: SelectCheck

ol.control. SelectCheck


new SelectCheck( [options])

Select features by property using a popup

Parameters:
Name Type Argument Description
options Object <optional>
Properties
Name Type Description
className string

control class name

target Element | undefined

Specify a target if you want the control to be rendered outside of the map's viewport.

source ol/source/Vector | Array.<ol/source/Vector>

the source to search in

property string

property to select on

label string

control label

max number

max feature to test to get the values, default 10000

selectAll number

select all features if no option selected

type string

check type: checkbox or radio, default checkbox

defaultLabel number

label for the default radio button

onchoice function | undefined

function triggered when an option is clicked, default doSelect

Fires:
  • event:select

Extends

Members


operationsList

List of operators / translation

Inherited From:

Methods


_escape(search)

Escape string for regexp

Parameters:
Name Type Description
search string
Inherited From:
Returns:
Type
string

_selectFeatures(result, features, condition, all, usecase)

Selection features in a list of features

Parameters:
Name Type Description
result Array.<ol.Feature>

the current list of features

features Array.<ol.Feature>

to test in

condition Object
Properties
Name Type Description
attr string

attribute name

op string

operator

val any

value to test

all boolean

all conditions must be valid

usecase boolean

use case or not when testing strings

Inherited From:

doSelect()

Select features by attributes

Overrides:

getFeatures()

Get feature collection to search in

Inherited From:
Returns:
Type
ol.Collection.<ol.Feature>

getSources()

Get vector source

Inherited From:
Returns:
Type
Array.<ol.source.Vector>

setFeatures(features)

Set feature collection to search in

Parameters:
Name Type Description
features ol.Collection.<ol.Feature>
Inherited From:

setMap(map)

Set the map instance the control associated with.

Parameters:
Name Type Description
map o.Map

The map instance.


setSources(source)

Set the current sources

Parameters:
Name Type Description
source ol.source.Vector | Array.<ol.source.Vector> | undefined
Inherited From:

setValues(options)

Set the popup values

Parameters:
Name Type Description
options Object
Properties
Name Type Description
values Object

a key/value list with key = property value, value = title shown in the popup, default search values in the sources

sort boolean

sort values