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.

At the simplest level I need to figure out how to create a customized OpenLayers LayerSwitcher Overlays section which is not using Checkboxes, but uses RadioButtons instead.

For my application its not desirable for the user to be able to select multiple layers. Eventually I'm going to need to be able to create group sections in the Overlay section of the LayerSwitcher, so if anyone has any hints on that I'd appreciate it.

I've seen the customized LayerSwitcher example on the OpenLayers site, but I can only get it to work in Chrome. I need to be able to support Safari on an iPad.

Thanks for any advice!

share|improve this question
1  
openlayers.org/dev/examples/controls.html has both checkbox and radio buttons –  Mapperz Oct 9 '12 at 16:54
add comment

2 Answers

Does this example do what you want? Or are there specific customizations you need on the layer control?

http://openlayers.org/dev/examples/google.html

Seems to work on Safari on a pc - though not tried it on an iPad.

share|improve this answer
1  
The BaseLayers section of the LayerSwitcher are exclusive (use Radio Buttons) by default. This example does not have any Overlays. I need to make the Overlays exclusive like the BaseLayers. Thanks! –  cbursk Oct 9 '12 at 17:53
add comment

For Grouping Layers in Openlayers use GeoExt Tree

enter image description here

Live Example

http://api.geoext.org/1.0/examples/tree.html

Javascript source for GeoExt http://api.geoext.org/1.0/examples/tree.js

share|improve this answer
    
Interesting - I will check this out. Any ideas on how to make the Overlays exclusive? Thanks for your reply! –  cbursk Oct 9 '12 at 18:06
    
After reading further about GeoExt, it seems this will not work for me. GeoExt requires also using ExtJS which requires buying a license, which I won't be able to do. I need to stick with free open-source software. Thanks for the reply though. –  cbursk Oct 9 '12 at 18:18
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.