[OpenLayers-Dev] Layers into Groups
olivier.terral
olivier.terral at geomatys.fr
Fri Oct 19 12:47:27 EDT 2007
Ola,
Sorry , I think it's Vincent Schut who did that but I 've often
manipulated Group layers .
I don't know what is it specified in OWS spec but I know what is done
in Mapbuilder.
We have choosen to add <Group> in an Extension tag because the spec was
not clear with groups and the Extension tag permits to add everything we
want (that's I've understood).
All groups are specified inside the General/Extension tags :
<ViewContext>
<General>
<Extension>
<GroupList>
<Group name="groupe1" folded="1"/>
<Group name="groupe2" folded="1"/>
</GroupList>
</Extension>
</General>
and if a Layer is a member of a Group, it's specified in its extension
tag like said Steven
<Layer queryable="1" hidden="0">
<Server service="wms" version="1.1.1" title="geo-demo15">
<OnlineResource xlink:type="simple" xlink:href="/geoserver/wms?" />
</Server>
<Name>geom:rivers_mercator</Name>
<Title>Rivières,fleuves</Title>
<SRS>EPSG:3395</SRS>
<StyleList>
.
.
.
</StyleList>
<FormatList>
<Format current="1">image/png</Format>
</FormatList>
<Extension>
<Group name="groupe2" />
</Extension>
</Layer>
But actually, this way of define groups is very limited because there is
only one level possible.
May be we should improve this solution to permit a tree view as I've
seen in the demo of Armïn
http://rips-uis.lubw.baden-wuerttemberg.de/rips/wms_viewer/test/myOpenLayer.php
Gertjan van Oosten a écrit :
> As quoted from "Steven M. Ottens" <steven at minst.net>:
>
>> The mapbuilder code uses
>> //wmc:ResourceList/wmc:Layer[wmc:Extension/wmc:Group/@name=$GroupName]
>> So this means that it selects the layers which have a group-extension.
>>
>
> The grouping thing is only supported in the OWSContext spec I believe
> (not in the WMC). The future of the OWSContext spec is unclear to me, BTW.
>
>
>> I believe the structure is hierarchical, so using group/layer approach
>> should be consistent with the OWS spec.
>> But I'm not the real expert, I though gertjan did the grouping code, but
>> could be wrong.
>>
>
> I don't think I did that, I seem to recall Olivier (Cc'ed) did that?
>
> Regards,
>
More information about the Dev
mailing list