[Cartoweb-users] Simple legend dropdown?
Chris Duncan, GISmatters
duncan at gismatters.com
Tue Jun 24 21:02:35 EDT 2008
Is it possible to create a single, simple dropdown control for
choosing one of several layers (or layergroups); when chosen, that
layer is activated and the others in the dropdown list are de-activated.
Another way of thinking about it is that I want the *behavior* of
radio buttons (mutually exclusive activation of one layer from a
group) with the *mechanism* of a drop-down list.
The reason I want this is to save space - it's more compact than radio
buttons (in my case, I want to let the user choose one of 5 different
basemap or background layers, so that takes up 5 lines in the legend
where a drop-down list would take up 1). I'm targeting 1024 x 768
screen sizes and 40% of the height is already taken up by the
website's banner, menu, and footer (not my design!), so I don't have
much left to work with and I want to minimize the need for scrolling
as much as possible.
The closest I can get is to create a layergroup with rendering =
dropdown, but this shows the selected layer (or layergroup) below the
dropdown with a checkbox. This has 2 disadvantages: (a) the layer I'm
trying to display appears twice in the legend - once as the selected
value in the dropdown, and once below in its own legend entry; (b) I
still have to use that layer's checkbox to activate/de-activate it.
Any suggestions, examples? It doesn't seem like a crazy idea, but I
couldn't find anything to guide me in the documentation or this list.
Thanks,
Chris
--
Chris Duncan, Ph.D.
President
GISmatters
duncan at GISmatters.com
http://www.gismatters.com/
1 Tuckerman Ln
Amherst, MA 01002
Tel: 413-549-2052
Fax: 508-637-2557
More information about the Cartoweb-users
mailing list