bryankaraffa

Dropdown for layers instead of checkbox

Discussion created by bryankaraffa on Sep 11, 2012
Latest reply on Sep 11, 2012 by btfou
I have been referencing the Dynamic Legend Sample as a foundation for my web map but am having some issues making the slight change I need.  In the sample, the two layers can be selected using checkboxes - enabling both to be visible at the same time.  Instead, I want a dropdown to show the selectable layers so that only one layer can be visible at a time and the legend will match the activated layer.   

This is what I currently have: http://map.geog.ucsb.edu/CampusFlora/v2/visibleLayers.html

I feel as if I am very close to getting this figured out but I just can't wrap my head around it - my javascript is so-so and my dojo is even less impressive..  Any help would be much appreciated!! I have attached my source code to this post for future reference (.zip)

Attachments

Outcomes