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?