Select to view content in your preferred language

Toggle Visibility of Features in FeatureLayer

1182
4
09-06-2012 06:45 AM
ManojrajTeli
Deactivated User
How to toggle the visibility of features in a feature-layer using check-boxes .I have grid containing check-boxes in a columns and so if i check off the checkbox i can turn off the visibility and if i check in turn on the visibility using ArcGIS javascript Api 3.1.Thank you in advance.
0 Kudos
4 Replies
CraigMcDade
Deactivated User
I started with this sample and modified it to meet my needs. It sounds like what you are trying to do.
0 Kudos
nathanmanning
Emerging Contributor
Are you trying to toggle visibility of an entire layer or individual graphics within a layer?
0 Kudos
ManojrajTeli
Deactivated User
I am trying to toggle visibility of individual graphics within a layer.:confused:
0 Kudos
nathanmanning
Emerging Contributor
If it's not a performance issue, each time you toggle visibility with the check boxes you could iterate over your graphics array and toggle visiblity. You just need some way to identify each graphics and correlate it with the check boxes. Adding a simple "name" attribute might be sufficient.

I am trying to toggle visibility of individual graphics within a layer.:confused:
0 Kudos