[Mapserver-users] SLD and multiple NamedLayer

Yewondwossen Assefa assefa at dmsolutions.ca
Wed Mar 24 15:18:00 EST 2004


Bart,

  I have tried to debug the problem this morning but was not successful. 
I can reproduce this on a windows machine but the the same setting works 
on a Linux setup. What is even worst was that on Windows, the request 
works when I am in the debugger.  I could not really pin point where was 
the problem but It seems that the inital parsing of the XML is the 
probelm (the XML seems to be valid but the parser returns an error).

  I have entered a bug on this for now in mapserver (bug 601).  I will 
give it another shot in few days.

Later,


bartvde at xs4all.nl wrote:
> Hi list,
> 
> is it possible with Mapserver as an SLD WMS to use multiple NamedLayer
> elements in the SLD document?
> 
> When we use only one NamedLayer with one Rule, everything works fine. When
> we use 2 NamedLayer elements, the original map gets drawn. We also tried
> copying the LAYER in the MAP file, so that we did not reference the same
> NamedLayer twice. This does not make any difference, the layer is rendered
> without any Filter/SLD applied.
> 
> The reason we want to use this kind of SLD is to have a selection drawn on
> top of another selection, and have the result in one image.
> 
> Any info appreciated.
> 
> <StyledLayerDescriptor version="1.0.0">
>    <NamedLayer>
>       <Name>Gemeentes1</Name>
>       <UserStyle>
>          <Title>xxx1</Title>
>          <FeatureTypeStyle>
>             <Rule>
>                <Filter>
>                   <PropertyIsEqualTo>
>                      <PropertyName>GEMNAAM</PropertyName>
>                      <Literal>Amsterdam</Literal>
>                   </PropertyIsEqualTo>
>                </Filter>
>                <LineSymbolizer>
>                   <Geometry>
>                      <PropertyName>center-line</PropertyName>
>                   </Geometry>
>                   <Stroke>
>                      <CssParameter name="stroke">#ffff00</CssParameter>
>                      <CssParameter name="stroke-width">10.0</CssParameter>
>                   </Stroke>
>                </LineSymbolizer>
>             </Rule>
>          </FeatureTypeStyle>
>       </UserStyle>
>    </NamedLayer>
>    <NamedLayer>
>       <Name>Gemeentes2</Name>
>       <UserStyle>
>          <Title>xxx2</Title>
>          <FeatureTypeStyle>
>             <Rule>
>                <Filter>
>                   <PropertyIsEqualTo>
>                      <PropertyName>GEMNAAM</PropertyName>
>                      <Literal>Amsterdam</Literal>
>                   </PropertyIsEqualTo>
>                </Filter>
>                <LineSymbolizer>
>                   <Geometry>
>                      <PropertyName>center-line</PropertyName>
>                   </Geometry>
>                   <Stroke>
>                      <CssParameter name="stroke">#0000ff</CssParameter>
>                      <CssParameter name="stroke-width">2.0</CssParameter>
>                   </Stroke>
>                </LineSymbolizer>
>             </Rule>
>          </FeatureTypeStyle>
>       </UserStyle>
>    </NamedLayer>
> </StyledLayerDescriptor>
> 
> Best regards,
> Bart
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 


-- 
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------






More information about the mapserver-users mailing list