Table Of Contents

Previous topic

Next topic

A store that contains a cache of objects.

Example Use

Sample to create a new store containing a cache of instances derived from map layers.

var store = new{
    map: myMap,
    layers: myLayers

Config Options

Configuration properties in addition to those listed for

Array If provided a custom layer record type with additional fields will be used. Default fields for every layer record are layer (OpenLayers.Layer) title (String). The value of this option is either a field definition objects as passed to the function or a constructor created using
Number Bitfields specifying the direction to use for the initial sync between the map and the store, if set to 0 then no initial sync is done. Defaults to|
Array(OpenLayers.Layer) Layers that will be added to the store (and the map, depending on the value of the initDir option.
OpenLayers.Map Map that this store will be in sync with. If not provided, the store will not be bound to a map.
reader The reader used to produce objects from OpenLayers.Layer objects. If not provided, a will be used.

Public Properties

Public properties in addition to those listed for
OpenLayers.Map Map that the store is synchronized with, if any.

Public Methods

Public methods in addition to those listed for

Parameter:layerOpenLayers.Layer or undefined if not found

Get the record for the specified layer


Events in addition to those listed for


Fires when the store is bound to a map.

Listener arguments: * * OpenLayers.Map