Sample code to create a store with features from a vector layer:
var store = new GeoExt.data.FeatureStore({
layer: myLayer,
features: myFeatures
});
Configuration properties in addition to those listed for Ext.data.Store.
Public methods in addition to those listed for Ext.data.Store.
Parameter: | layer – OpenLayers.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: | feature – OpenLayers.Vector.Feature |
---|---|
Returns: | GeoExt.data.FeatureRecord The record corresponding to the given feature. Returns undefined if no record matches. |
Get the record corresponding to a feature.
Parameter: | feature – OpenLayers.Vector.Feature |
---|---|
Returns: | GeoExt.data.FeatureRecord The record corresponding to the given feature. Returns null if no record matches. |
Deprecated Use getByFeature instead.
Get the record corresponding to a feature.