Class: SelectBase

ol.control. SelectBase

This is the base class for Select controls on attributes values. Abstract base class; normally only used for creating subclasses and not instantiated in apps.


new SelectBase( [options])

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

control class name

content Element

form element

target Element | undefined

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

features ol.Collection.<ol.Feature>

a collection of feature to search in, the collection will be kept in date while selection

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

the source to search in if no features set

btInfo string

ok button label

Fires:
  • event:select

Extends

Members


operationsList

List of operators / translation

Methods


_escape(s)

Escape string for regexp

Parameters:
Name Type Description
s *

value to escape

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


doSelect(options)

Select features by attributes

Parameters:
Name Type Description
options *
Properties
Name Type Description
sources Array.<ol.source.Vector> | undefined

source to apply rules, default the select sources

useCase bool

case sensitive, default false

matchAll bool

match all conditions, default false

conditions Array.<conditions>

array of conditions

Fires:
  • event:select
Returns:
Type
Array.<ol.Feature>

getFeatures()

Get feature collection to search in

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

getSources()

Get vector source

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

setFeatures(features)

Set feature collection to search in

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

setSources(source)

Set the current sources

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