[wms-dev] differentiate between layers

Bart van den Eijnden bartvde at xs4all.nl
Mon Jan 30 01:52:55 EST 2006


Hi,

Layername+stylename would be a good start. But also, do remember that a
WMC can have user style info in the form of SLD, in which case there will
not be a style name, but an SLD fragment in the <Style>. You will need to
take that into account as well.

Theoretically users could create a context having a layername + stylename
combination twice and only changing for instance the image format. But as
a use case this does not make much sense, so it would go too far probably
to take that into account.

Best regards,
Bart

> Hi all,
>
> We at the mapbuilder community (mapbuilder.codehaus.org) are stuck at
> the problem of having multiple layers with the same name but different
> styles. Right now we use the layerName as the unique identifier for our
> application, but we discovered that the following WMC doc doesn't work
> that way:
> <Layer queryable="1" hidden="0">
> <Server service="OGC:WMS" version="1.1.1"
> title="gdt:highways">
> <OnlineResource xlink:type="simple"
> xlink:href="http://localhost:8090/geoserver/wms"/>
> </Server>
> <Name>gdt:highways</Name>
> <Title>US Highways</Title>
> <SRS>EPSG:4326</SRS>
> <FormatList><Format
> current="1">image/png</Format></FormatList>
> <StyleList>
> <Style
> current="1"><Name>orci_us_highways</Name><Title>orci_us_highways</Title></Style>
> </StyleList>
> </Layer>
> <Layer queryable="1" hidden="0">
> <Server service="OGC:WMS" version="1.1.1"
> title="gdt:highways">
> <OnlineResource xlink:type="simple"
> xlink:href="http://localhost:8090/geoserver/wms"/>
> </Server>
> <Name>gdt:highways</Name>
> <Title>Interstates</Title>
> <SRS>EPSG:4326</SRS>
> <FormatList><Format
> current="1">image/png</Format></FormatList>
> <StyleList>
> <Style
> current="1"><Name>orci_interstates</Name><Title>orci_interstates</Title></Style>
> </StyleList>
> </Layer>
>
> It has the same layer-name but different styles. What is the
> official/preferred/usual way to distinguish between layers that have the
> same name, but different styles?
> The problem lies in the actual call to the layer image, the WMC doc
> itself is parsed fine, but we're not sure how to call the layer image.
> Right now we give it an unique ID which is generated (partly) by the
> layer-name. Should we use a combination of layer-name and style-name or
> will we run into problems there in other combinations as well?
>
> Meny thanks for your thoughts,
>
> Steven Ottens
> Mapbuilder-dev
> _______________________________________________
> wms-dev mailing list
> wms-dev at lists.eogeo.org
> http://lists.eogeo.org/mailman/listinfo/wms-dev
>




More information about the wms-dev mailing list