[OpenLayers-Dev] Layers into Groups

Lorenzo Becchi lorenzo at ominiverdi.com
Fri Oct 19 16:09:05 EDT 2007


Hi Olivier,

> May be we should improve this solution to permit a tree view as I've 
> seen in the demo of Armïn
>   
I think too we shoud choose something all together and try to use 
osgeo-standards mailing list to make lobby and help OGC to go in a good 
direction.
As we are dealing with OGC standards, why don't we use the solution 
already used by WMS?

well, it's a bit I'm not revisioning the specs but should be something 
like this:
<layer>
    <title>my group of level 1</title>

    <layer>
       <title> my group of layer 2</title>
        <layer>
           <name>layer_1</name>
            ....
        </layer>
        <layer>
            <name>layer_2</name>
           ....
        </layer>
    </layer>

    <layer>
       <name>layer3</name>
    </layer>
</layer>


ciao
Lorenzo






olivier.terral wrote:
> 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,
>>   
>>     
>
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>   



More information about the Dev mailing list