[OpenLayers-Users] Attribute-driven Size element in SLD

andrewjc Andrew.Chamberlain at infoterra-global.com
Fri Sep 2 04:59:34 EDT 2011


Hi All,

I've come across something which /seems/ to be a bug, and was wondering if
anyone else has had the same issue (a search of the forum revealed nothing).

I'm doing some client-side styling of a WFS layer in openlayers, and using
SLD to do this (see below). The SLD uses two attributes to apply dynamic
styling of each feature; "wind_direction" for the <Rotation> element, and
"wind_speed" for the <Size> element.  However, only the <Rotation> seems to
work.  When the <Size> element is changed from a static figure to an
attribute, the features are not rendered at all.

The same SLD works when applied server-side (by Geoserver), so I'm starting
to think it's a bug in the openlayers.

Has anyone else noticed this?

Andy
(FireFox 6.0)

------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<sld:StyledLayerDescriptor version="1.0.0"
xmlns:sld="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:gml="http://www.opengis.net/gml"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/sld
http://schemas.opengis.net/sld/1.0.0 StyledLayerDescriptor.xsd">
  <sld:NamedLayer>
    <sld:Name>WIND</sld:Name>
    <sld:UserStyle>
      <sld:Name>DefaultSensors</sld:Name>
      <sld:IsDefault>1</sld:IsDefault>
      <sld:FeatureTypeStyle>
        <sld:Rule>
          <sld:PointSymbolizer>
            <sld:Graphic>
              <sld:ExternalGraphic>
                <sld:OnlineResource xlink:href="arrow.png" />
                <sld:Format>image/svg+xml</sld:Format>
              </sld:ExternalGraphic>
              <sld:Size>${wind_speed}</sld:Size>
              <sld:Rotation>${wind_direction}</sld:Rotation>
            </sld:Graphic>
          </sld:PointSymbolizer>
        </sld:Rule>
      </sld:FeatureTypeStyle>
    </sld:UserStyle>
  </sld:NamedLayer>
</sld:StyledLayerDescriptor>

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Attribute-driven-Size-element-in-SLD-tp6753213p6753213.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list