Ticket #80 (new enhancement)

Opened 3 months ago

(Un-)Checking Group in Legend (Un-)Checks All Contained Layers

Reported by: schneiderei Assigned to: madair
Priority: P2 Milestone: 1.1
Component: MapServer Version: 1.0.6
Severity: Major Keywords:
Cc: External ID:
state: New Browser: All
Operating System: All

Description

When a group layer is checked (or unchecked) in the legend, all map layers the group contains are checked (or unchecked, respectively). This behaviour is not what the user expects. If the user, for instance, unchecks a group, all layer it contains should be hidden from the map. If the user checks the group again, the layers that were visible before unchecking -- and only these -- should become visible on the map again. Checking and unchecking a group should not change the visibility status of the layers it contains. Instead, the visibility status of the group should simply override the status of the layers.

I suspect that the problem only occurs when using MapServer. In the functions showGroup() and hideGroup() in MapServer/MapServer?.js, there are the following lines:

-- in showGroup():

for (var i=0; i<group.layers.length; ++i) {

group.layers[i].show();

}

-- in hideGroup();

for (var i=0; i<group.layers.length; ++i) {

group.layers[i].hide();

}

I believe that these lines can be deleted.