Ticket #1086 (new feature)
LayerSwitcher updates: Layer groups, buttons for dropping moving and other features
| Reported by: | jachym | Owned by: | euzuro |
|---|---|---|---|
| Priority: | minor | Milestone: | Addins |
| Component: | Control.LayerSwitcher | Version: | 2.5 |
| Keywords: | Cc: | ||
| State: | Needs Discussion |
Description
Following patch implements simple way, how to order data layers (isBaseLayer == false) into groups. All map layers within one group can be made visible or hidden with one mouse click. See http://dev.openlayers.org/sandbox/jachym/openlayers/examples/layer-groups.html for example.
The user has to specify group name as one of the layer properties, for example:
var dm = new OpenLayers.Layer.WMS( "DM Solutions Transit",
"http://www2.dmsolutions.ca/cgi-bin/mswms_gmap",
{layers: "rail,road",
transparent: "true", format: "image/png"
},
{
group:"Transit"
});
Groups can be grouped to other groups. You have to use "/" (slash) mark, for group hierarchy definition:
...
group: "Transit/Roads",
...
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

