<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>RE: [fusion-users] More than two hierarchy levels in the legend (with MapServer)</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>With respect to MapServer not allowing for nested groups:<BR>
a) In the map file, you can add the GROUP key word to groups.<BR>
b) By adding some lines of code to MapServer.js, it is then possible to construct a legend with nested groups.<BR>
c) The maps are rendered correctly in my application, so it seems that Fusion sends correct information to the MapServer, and the MapServer deals with it the way it should.<BR>
<BR>
With respect to the toggling of the visibity status of entire groups:<BR>
-- The out-of-the-box behaviour of Fusion is, IMHO, a bit odd: when I uncheck a group, all layers are unchecked, when I check the group again, all (!) layers in the group are checked. I'd expect the layers to remain unchanged, the status of the groups should simply override the status of the layers, not change it.<BR>
-- The behaviour is as expected with nested groups: If I uncheck a group, all nested groups keep their status. The map is still rendered correctly, that is, the nested groups and all the layers contained are not drawn (even though the attribute 'visible' is 'true' for some nested groups and layers).<BR>
<BR>
Bernhard<BR>
<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: pdescham49@gmail.com on behalf of Paul Deschamps<BR>
Sent: Tue 6/10/2008 5:52 PM<BR>
To: Paul Spencer<BR>
Cc: Bernhard Schneider; fusion-users@lists.osgeo.org<BR>
Subject: Re: [fusion-users] More than two hierarchy levels in the legend (with MapServer)<BR>
<BR>
One other thing unmentioned here is that layer &quot;grouping&quot; allows you<BR>
to toggle the visibility status of an entire group through the legend<BR>
widget.<BR>
<BR>
Cheers<BR>
<BR>
Paul D.<BR>
<BR>
<BR>
On Tue, Jun 10, 2008 at 10:36 AM, Paul Spencer &lt;pspencer@dmsolutions.ca&gt; wrote:<BR>
&gt; Bernhard,<BR>
&gt;<BR>
&gt; This restriction comes from the fact that MapServer itself only supports one<BR>
&gt; level of grouping via the GROUP keyword in a LAYER object.&nbsp; The map<BR>
&gt; rendering does not specifically use groups, it uses the layers themselves in<BR>
&gt; the order they are present in the map file (layer at the top is drawn first,<BR>
&gt; subsequent layers are drawn over it - painters algorithm).&nbsp; Groups are only<BR>
&gt; for organising layers in the legend.<BR>
&gt;<BR>
&gt; Cheers<BR>
&gt;<BR>
&gt; Paul<BR>
&gt;<BR>
&gt; On 10-Jun-08, at 8:54 AM, Bernhard Schneider wrote:<BR>
&gt;<BR>
&gt;&gt; Hello everyone,<BR>
&gt;&gt;<BR>
&gt;&gt; Digging a bit further, I realised that the code in LoadMap.php<BR>
&gt;&gt; (fusion/MapServer/php/) is responsible for restricting the nesting depth to<BR>
&gt;&gt; 2. It retrieves the information from MapScript which itself read it from the<BR>
&gt;&gt; map file. There is the comment &quot;parent is always not set for mapserver since<BR>
&gt;&gt; we can't have nested groups&quot; in the code.<BR>
&gt;&gt;<BR>
&gt;&gt; Is it the MapServer (MapScript) that imposes the limitation? I wonder<BR>
&gt;&gt; whether it isn't just a matter of interpreting the map file from a &quot;client<BR>
&gt;&gt; side&quot;. The map rendering engine should not worry about nesting levels, it<BR>
&gt;&gt; only needs to know which layers are visible and in which order they should<BR>
&gt;&gt; be drawn. Aren't the groups mainly (only) there for organising the layers in<BR>
&gt;&gt; the legend?<BR>
&gt;&gt;<BR>
&gt;&gt; Just wondering.<BR>
&gt;&gt; Bernhard<BR>
&gt;&gt;<BR>
&gt;&gt; _______________________________________________<BR>
&gt;&gt; fusion-users mailing list<BR>
&gt;&gt; fusion-users@lists.osgeo.org<BR>
&gt;&gt; <A HREF="http://lists.osgeo.org/mailman/listinfo/fusion-users">http://lists.osgeo.org/mailman/listinfo/fusion-users</A><BR>
&gt;<BR>
&gt;<BR>
&gt; __________________________________________<BR>
&gt;<BR>
&gt;&nbsp;&nbsp; Paul Spencer<BR>
&gt;&nbsp;&nbsp; Chief Technology Officer<BR>
&gt;&nbsp;&nbsp; DM Solutions Group Inc<BR>
&gt;&nbsp;&nbsp; <A HREF="http://www.dmsolutions.ca/">http://www.dmsolutions.ca/</A><BR>
&gt;<BR>
&gt; _______________________________________________<BR>
&gt; fusion-users mailing list<BR>
&gt; fusion-users@lists.osgeo.org<BR>
&gt; <A HREF="http://lists.osgeo.org/mailman/listinfo/fusion-users">http://lists.osgeo.org/mailman/listinfo/fusion-users</A><BR>
&gt;<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>