Clear graphics on FeatureLayer

1194
1
07-06-2011 04:37 AM
Ganael_Jatteau
New Contributor II
Hi,

I have an application that changes the definition expression of a FeatureLayer. However, after I change that value, I'not able to clear the existing graphics on the layer and force to query the new geometries.
Right now, I remove the layer and create a new one. Is there a more appropriate way to do that ?

Cheers,
Ganael
Tags (2)
0 Kudos
1 Reply
Ganael_Jatteau
New Contributor II
I've upgraded to the latest lib 2.3.1, and I have a solution that works:

featureLayer.definitionExpression = "bla bla..."
featureLayer.clear();
featureLayer.refresh();
0 Kudos