Select to view content in your preferred language

Feature Layer visibility

3018
3
06-30-2010 09:59 AM
RaviKonaparthi
Deactivated User
Hi,

I have more than 1 feature layer on my map and based on some specific condition only one feature layer has to be displayed. Is there any way to hide the other feature layers.

I have tried the layer opacity property which is not working and also tried the feature layer visible property. This visible property is for initial visibility of the layer.

Can anyone tell me how to hide a feature layer at runtime.

Regards,
Ravi.
0 Kudos
3 Replies
AdamPfister
Esri Contributor
esri.layers.FeatureLayer 


inherits from

esri.layers.GraphicsLayer 


which inherits from

esri.layers.Layer


which has a .hide() method and a .show() method.  that should work for you.
0 Kudos
RaviKonaparthi
Deactivated User
Hi Adam,

Thank you. That worked for me.

Regards,
Ravi.
0 Kudos
AdamPfister
Esri Contributor
0 Kudos