Table Of Contents

Previous topic

Next topic

A store containing entries that optionally synchronizes with an OpenLayers.Layer.Vector.

Example Use

Sample code to create a store with features from a vector layer:

var store = new{
    layer: myLayer,
    features: myFeatures

Config Options

Configuration properties in addition to those listed for

OpenLayers.Filter This filter is evaluated before a feature record is added to the store.
Array(OpenLayers.Feature.Vector) Features that will be added to the store (and the layer if provided).
Number Bitfields specifying the direction to use for the initial sync between the layer and the store, if set to 0 then no initial sync is done. Default is|
OpenLayers.Layer.Vector Layer to synchronize the store with.
reader The reader used to produce records from objects features. Default is

Public Methods

Public methods in addition to those listed for

Parameter:layerOpenLayers.Layer Layer that the store should be synchronized with.

Bind this store to a layer instance, once bound the store is synchronized with the layer and vice-versa.

Parameter:featureOpenLayers.Vector.Feature The record corresponding to the given feature. Returns null if no record matches.

Get the record corresponding to a feature.

Unbind this store from the layer it is currently bound.