[fusion-users] More than two hierarchy levels in the legend (with MapServer)

Paul Deschamps pdeschamps at dmsolutions.ca
Thu Jun 12 16:29:37 EDT 2008


I have noticed this as well can you please log a ticket Bernhard.

Cheers

Paul D.

On Thu, Jun 12, 2008 at 2:10 AM, Bernhard Schneider
<bernhard.schneider at ilu.ch> wrote:
> With respect to MapServer not allowing for nested groups:
> a) In the map file, you can add the GROUP key word to groups.
> b) By adding some lines of code to MapServer.js, it is then possible to
> construct a legend with nested groups.
> 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.
>
> With respect to the toggling of the visibity status of entire groups:
> -- 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.
> -- 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).
>
> Bernhard
>
>
>
> -----Original Message-----
> From: pdescham49 at gmail.com on behalf of Paul Deschamps
> Sent: Tue 6/10/2008 5:52 PM
> To: Paul Spencer
> Cc: Bernhard Schneider; fusion-users at lists.osgeo.org
> Subject: Re: [fusion-users] More than two hierarchy levels in the legend
> (with MapServer)
>
> One other thing unmentioned here is that layer "grouping" allows you
> to toggle the visibility status of an entire group through the legend
> widget.
>
> Cheers
>
> Paul D.
>
>
> On Tue, Jun 10, 2008 at 10:36 AM, Paul Spencer <pspencer at dmsolutions.ca>
> wrote:
>> Bernhard,
>>
>> This restriction comes from the fact that MapServer itself only supports
>> one
>> level of grouping via the GROUP keyword in a LAYER object.  The map
>> rendering does not specifically use groups, it uses the layers themselves
>> in
>> the order they are present in the map file (layer at the top is drawn
>> first,
>> subsequent layers are drawn over it - painters algorithm).  Groups are
>> only
>> for organising layers in the legend.
>>
>> Cheers
>>
>> Paul
>>
>> On 10-Jun-08, at 8:54 AM, Bernhard Schneider wrote:
>>
>>> Hello everyone,
>>>
>>> Digging a bit further, I realised that the code in LoadMap.php
>>> (fusion/MapServer/php/) is responsible for restricting the nesting depth
>>> to
>>> 2. It retrieves the information from MapScript which itself read it from
>>> the
>>> map file. There is the comment "parent is always not set for mapserver
>>> since
>>> we can't have nested groups" in the code.
>>>
>>> Is it the MapServer (MapScript) that imposes the limitation? I wonder
>>> whether it isn't just a matter of interpreting the map file from a
>>> "client
>>> side". The map rendering engine should not worry about nesting levels, it
>>> only needs to know which layers are visible and in which order they
>>> should
>>> be drawn. Aren't the groups mainly (only) there for organising the layers
>>> in
>>> the legend?
>>>
>>> Just wondering.
>>> Bernhard
>>>
>>> _______________________________________________
>>> fusion-users mailing list
>>> fusion-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/fusion-users
>>
>>
>> __________________________________________
>>
>>   Paul Spencer
>>   Chief Technology Officer
>>   DM Solutions Group Inc
>>   http://www.dmsolutions.ca/
>>
>> _______________________________________________
>> fusion-users mailing list
>> fusion-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/fusion-users
>>
>
>


More information about the fusion-users mailing list