Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have four layers in the LayerSwitcher. When the map is loaded all the layers are checked by default. I do not want to show all Layers as checked.How do I uncheck a layer when the map is loaded?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Use the layer's setVisibility function to turn them off before you add them to the map.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.