Class: ol.Collection

ol.Collection

new Collection

Parameters:
Name Type Argument Description
array Array= <optional>
(Optional) Array.
Source:
  • collection.js, line 76

Extends

Members

changed

Inherited From:
Source:
  • object.js, line 166

setValues

Inherited From:
Source:
  • object.js, line 275

Methods

bindTo

Parameters:
Name Type Argument Description
key string Key.
target ol.Object Target.
targetKey string= <optional>
(Optional) Target key.
noNotify boolean= <optional>
(Optional) No notify.
Inherited From:
Source:
  • object.js, line 145

clear

Remove all elements from the collection.
Source:
  • collection.js, line 95

forEach

Parameters:
Name Type Argument Description
f Function Function.
obj Object= <optional>
(Optional) Object.
Source:
  • collection.js, line 106

get

Parameters:
Name Type Description
key string Key.
Inherited From:
Source:
  • object.js, line 173
Returns:
Value.
Type
*

getArray

Source:
  • collection.js, line 114
Returns:
Array.
Type
Array

getAt

Parameters:
Name Type Description
index number Index.
Source:
  • collection.js, line 123
Returns:
Element.
Type
*

getKeys

Get a list of object property names.
Inherited From:
Source:
  • object.js, line 197
Returns:
List of property names.
Type
Array.<string>

getLength

Source:
  • collection.js, line 131
Returns:
Length.
Type
number

insertAt

Parameters:
Name Type Description
index number Index.
elem * Element.
Source:
  • collection.js, line 140

notify

Parameters:
Name Type Description
key string Key.
Inherited From:
Source:
  • object.js, line 208

pop

Source:
  • collection.js, line 153
Returns:
Element.
Type
*

push

Parameters:
Name Type Description
elem * Element.
Source:
  • collection.js, line 162
Returns:
Length.
Type
number

removeAt

Parameters:
Name Type Description
index number Index.
Source:
  • collection.js, line 173
Returns:
Value.
Type
*

set

Parameters:
Name Type Description
key string Key.
value * Value.
Inherited From:
Source:
  • object.js, line 236

setAt

Parameters:
Name Type Description
index number Index.
elem * Element.
Source:
  • collection.js, line 189

setOptions

Parameters:
Name Type Description
options Object.<string, *> Options.
Inherited From:
Source:
  • object.js, line 258

unbind

Parameters:
Name Type Description
key string Key.
Inherited From:
Source:
  • object.js, line 281

unbindAll

Removes all bindings.
Inherited From:
Source:
  • object.js, line 298