This class is to be used when one wants to insert, remove, and update features in a grid as a result of features being inserted, removed, modified in a vector layer.
This widget is deprecated and will be removed in next mapfish version. Please use http://geoext.org
var layer = new OpenLayers.Layer.Vector("vector"); var store = new Ext.data.Store({ reader: new mapfish.widgets.data.FeatureReader( {}, [{name: "name", type: "string"}] ) }); var mediator = new mapfish.widgets.data.LayerStoreMediator({ store: store, layer: layer, filter: function(feature) { return feature.state != OpenLayers.State.UNKNOWN; } });
mapfish. | This class is to be used when one wants to insert, remove, and update features in a grid as a result of features being inserted, removed, modified in a vector layer. |
Constructor | |
mapfish. | Create an instance of mapfish.widgets.data.LayerStoreMediator. |
Properties | |
layer | {OpenLayers.Layer.Vector} The vector layer. |
filter | {Function} a filter function called for each feature to be inserted, the feature is passed as an argument to the function, if it returns true the feature is inserted into the store, otherwise the feature is not inserted. |
autoActivate | {Boolean} True if the mediator must be activated as part of its creation, false otherwise; if false then the mediator must be explicitely activate using the activate method; defaults to true. |
Functions | |
activate | Activate the mediator. |
deactivate | Deactivate the mediator. |
Create an instance of mapfish.widgets.data.LayerStoreMediator.
config | {Object} A config object used to set the layer store mediator’s properties (see below for the list of supported properties), and configure it with the Ext store; see the usage example above. |
{OpenLayers.Layer.Vector} The vector layer.
Activate the mediator.
activate: function()
Deactivate the mediator.
deactivate: function()