[OpenLayers-Users] OpenLayers and SLD

Mark Paxton mark at innaxys.com
Thu Mar 7 07:28:05 PST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
Hi all,

Please could anyone help clarify a few issues regarding SDL and
OpenLayers...

Is it right that it is only possible to import one symbolizer per SLD?

The SLD I am trying looks as below - is this supported by OL?

Thanks,
Mark


<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld
StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld"
                              xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
                             
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NamedLayer>
<Name>cities</Name>
<UserStyle>
<Name>Default</Name>
<Title>symbol with label</Title>
<FeatureTypeStyle>
<Rule>
  <PointSymbolizer>
    <Graphic>
    <Mark>
       <ExternalGraphic><OnlineResource xlink:type="simple"
xlink:href="http://mywebapp/resources/images/features/boat-icon-32x32.png <view-source:http://localhost:8084/Pctp/resources/images/features/boat-icon-32x32.png>"
/>
       <Format>image/png</Format>
    </ExternalGraphic>   
    </Mark>
    <Size>12.0</Size>
    </Graphic>
  </PointSymbolizer>
  <TextSymbolizer>
    <Label><ogc:PropertyName><c:out
value="${displayedFeatureType.labelAttribute}" /></ogc:PropertyName></Label>
    <Font>
      <CssParameter name="font-family">times</CssParameter>
      <CssParameter name="font-style">italic</CssParameter>
      <CssParameter name="font-weight">bold</CssParameter>
      <CssParameter name="font-size">12</CssParameter>
    </Font>
    <Fill>
    <CssParameter name="fill">#FF0000</CssParameter>
    </Fill>
    <LabelPlacement>
      <PointPlacement>
      <AnchorPoint>
      <AnchorPointX>1</AnchorPointX>
      <AnchorPointY>1</AnchorPointY>
      </AnchorPoint>
      <Displacement>
      <DisplacementX>-5</DisplacementX>
      <DisplacementY>0</DisplacementY>
      </Displacement>     
      </PointPlacement>
    </LabelPlacement>
  </TextSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
 
iQEcBAEBAgAGBQJROLIFAAoJENpFS/LwoFEvWKEIAIsNULvsF4rdcZ53xHllFraV
pwO0HHDH7vTLRJVBFh2jBxoJE6CCH7puXd66/4ePBxQgZ6y+olEDpfYddPkqO4r1
USWu8eh6YZQhNNwmVyy9uA5oKc1kgo94zFsM4wIfSbqv2KGBAbHOB2YFngnzwXY7
2dJA8+s1upXAJXIIN64pTiuMv5o6c4e/xYh+kFYMPV9TQ/4mCnTwRo/k9+FihYyK
rhYwbXLkh/ZkjhOc0EYNk3LXyWz51mxrAbHKm1Ab0uEJytrB6qpP6uvDSzzh9flL
91r0lHt0zMP54sdhYqgnsyPxg68CL4lNBblU18xt5uI08Ibweb3xG7VSNKJasi0=
=LrP5
-----END PGP SIGNATURE-----



More information about the Users mailing list