靜態unAdd elements to the collection. This pushes each item in the provided array to the end of the collection.
Array.
This collection.
Iterate over each element, calling the provided callback.
Get a reference to the underlying Array object. Warning: if the array is mutated, no events will be dispatched by the collection, and the collection's "length" property won't be in sync with the actual length of the array.
Array.
Remove the last element of the collection and return it.
Return undefined if the collection is empty.
Element.
Remove the element at the provided index and return it.
Return undefined if the collection does not contain this index.
Index.
Value.
Listen for a certain type of event.
The event type or array of event types.
The listener function.
可選opt_this: ObjectThe object to use as this in listener.
Unique key for the listener. If called with an array of event types as the first argument, the return will be an array of keys.
Listen once for a certain type of event.
The event type or array of event types.
The listener function.
可選opt_this: ObjectThe object to use as this in listener.
Unique key for the listener. If called with an array of event types as the first argument, the return will be an array of keys.
函數Removes an event listener using the key returned by on() or once().
Note that using the ol.Observable.unByKey static function is to
be preferred.
可選opt_array: T[]Array.
An expanded version of standard JS Array, adding convenience methods for manipulation. Add and remove changes to the Collection trigger a Collection event. Note that this does not cover changes to the objects within the Collection; they trigger events on the appropriate object, not on the Collection as a whole.
Classdesc
An expanded version of standard JS Array, adding convenience methods for manipulation. Add and remove changes to the Collection trigger a Collection event. Note that this does not cover changes to the objects within the Collection; they trigger events on the appropriate object, not on the Collection as a whole.
Fires
ol.Collection.Event
參數: opt_array
Array.
Api
stable