Class: Features

Features()

new Features()

A data store holding OpenLayers feature objects (`ol.Feature`).
Source:

Members

(static) createLayer

Setting this flag to `true` will create a vector #layer with the given #features and adds it to the given #map (if available).
Source:

(static) features

Initial set of features. Has to be an `ol.Collection` object with `ol.Feature` objects in it.
Source:

(static) map

A map object to which a possible #layer will be added.
Source:

(static) passThroughFilter

Setting this flag to true the filter of the store will be applied to the underlying vector #layer. This will only have an effect if the source of the #layer is NOT configured with an 'url' parameter.
Source:

(static) style

An OpenLayers 3 style object to style the vector #layer representing the features of this store.
Source:

Methods

(static) constructor(config)

Constructs the feature store.
Parameters:
Name Type Description
config Object The configuration object.
Source:

(protected, static) destroy()

Overwrites the destroy function to ensure the #layer is removed from the #map when it has been created automatically while construction in case of destruction of this store.
Source:

(static) getByFeature(feature) → {Ext.data.Model}

Returns the record corresponding to a feature.
Parameters:
Name Type Description
feature ol.Feature An ol.Feature object to get the record for
Source:
Returns:
The model instance corresponding to the feature
Type
Ext.data.Model

(static) getFeatures() → {ol.Collection}

Returns the FeatureCollection which is in sync with this store.
Source:
Returns:
The underlying OpenLayers `ol.Collection` of `ol.Feature`.
Type
ol.Collection