Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I built an WFS-T with a grid panel (Ext.grid.EditorGridPanel) to edit features' attributes. Now, I want the feature store (GeoExt.data.FeatureStore) to reload/update automatically so that other users see changes committed immediately without reloading the whole webmap.

I would appreciate hints for:

  1. Attaching such an "update store" function either to my "save"-button or to my store's "afteredit"-listener
  2. Having the whole store updated continuously in an automatic way
share|improve this question

1 Answer 1

Solved! ..by using refresh Strategy:

1.Intitalize:
var refreshStrategy = new OpenLayers.Strategy.Refresh();

2.Apply strategy to WFS-Layer:
var POIs = new OpenLayers.Layer.Vector("Schneeampel", { strategies: [new OpenLayers.Strategy.Fixed(), saveStrategy, refreshStrategy], projection: WGS84, // empty style map, will be populated in setLayerStyles protocol: new OpenLayers.Protocol.WFS({...

3.Register event "refresh" in combination with event "save" in Save-Button-section:
saveStrategy.events.register("success", null, function(){refreshStrategy.refresh()})

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.