You might try:
context.getLayerManager().fireFeaturesChanged( features,
FeatureEventType.ATTRIBUTES_MODIFIED, layer);
Also look into:
context.getLayerManager().setFiringEvents(false); //before loop
context.getLayerManager().setFiringEvents(true); //after loop
Larry
On Wed, Jun 30, 2010 at 10
Hi Larry,
Thank for your reply. I've tested that view panel can update automatically when
attribute is updated. However, if I continue to update an attribute in a "for"
loop, it seems it cannot refresh. I wonder if the auto update would be
activated immediately after the setAttribute function,
Hi Elton,
Usually for these situations update events would fire automatically. If
for some reason, they do not, you can fire them manually.
regards,
Larry
On Tue, Jun 29, 2010 at 8:42 AM, Elton Chan wrote:
> Hi there,
>
> Suppose if I have a layer added in the LayerTreePanel, and I also got
Hi there,
Suppose if I have a layer added in the LayerTreePanel, and I also got the
FeatureCollection of the layer, how can I update the layer using program and
refresh it on the view panel.
Thanks,
Elton
--
T