breilly47

Hiding Multiple Feature Layers

Discussion created by breilly47 on Oct 25, 2011
Latest reply on Oct 25, 2011 by stevel
Is there a way to use layer.hide(); for multiple layers in a single function? I need to hide several layers at once, and the order they're in seems to be affecting its function. I have this:

   bikeLayer.hide();
   mopedLayer.hide();
   atmLayer.hide();
   recLayer.hide();
   foodLayer.hide();


as part of a larger function. if bikeLayer is turned on, I can hide it. if only atmLayer is on, it won't shut off, with the error that bikeLayer is not defined. How can I do this?

Outcomes