Select to view content in your preferred language

Toggle visibility of graphics in FeatureLayer

737
2
06-24-2010 11:13 AM
Joachim_EckboJuell
Occasional Contributor
Hi,

I have a fairly large FeatureLayer loading at startup (Snapshot). And I want the user to be able to toggle the visibility of groups of the graphics based on an attribute (in a TOC). And it all should happen client-side, not by a new query to the server. How can I accomplish this?

Thanks 🙂
0 Kudos
2 Replies
dotMorten_esri
Esri Notable Contributor
Create multiple FeatureLayers, and set a where clause on each of them. ie
<esri:FeatureLayer Where="GroupID=1" />
<esri:FeatureLayer Where="GroupID=2" />

You can then simply toggle these layers.
0 Kudos
Joachim_EckboJuell
Occasional Contributor
Thanks Morten. So there is no way to quickly toggle the visibility of individual Graphics in a Feature- or GraphicsLayer?
0 Kudos