[fusion-trac] #80: (Un-)Checking Group in Legend (Un-)Checks All Contained Layers

Fusion trac_fusion at osgeo.org
Mon Jun 16 03:37:24 EDT 2008


#80: (Un-)Checking Group in Legend (Un-)Checks All Contained Layers
---------------------------+------------------------------------------------
   Reporter:  schneiderei  |       Owner:  madair
       Type:  enhancement  |      Status:  new   
   Priority:  P2           |   Milestone:  1.1   
  Component:  MapServer    |     Version:  1.0.6 
   Severity:  Major        |    Keywords:        
External_id:               |       State:  New   
    Browser:  All          |          Os:  All   
---------------------------+------------------------------------------------
 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.

-- 
Ticket URL: <http://trac.osgeo.org/fusion/ticket/80>
Fusion <http://trac.osgeo.org/fusion>
Fusion is a web-mapping application development framework for MapServer and MapGuide OS.


More information about the fusion-trac mailing list