[OpenLayers-Users] Using an SLD from Geoserver in my WMS request and the opacity isn't working for the fill

jim.meyer at concept-solutions.com jim.meyer at concept-solutions.com
Wed Oct 7 13:24:58 EDT 2009


Hi everyone,

 

   My WMS layers is defined as follows (NOTE: shapeStyle corresponds to the
SLD below):

 

   var shapelayer = new OpenLayers.Layer.WMS(

                   "Shapes",

                   "/geoserver/wms?",

                   {

                      layers: 'SUA:schedule',

                      styles: shapeStyle,

                      srs: 'EPSG:4326',

                      format: 'image/png8',

                      cql_Filter: cqlfilter,

                      tiled: 'true',

                      transparent: true

                   },

                   {

                         'isBaseLayer': false, 'wrapDateLine': true

                   }

                );            

 

   The geoserver SLD is defined as follows:

 

   <?xml version="1.0" encoding="UTF-8"?>

<StyledLayerDescriptor version="1.0.0" 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"

  xsi:schemaLocation="http://www.opengis.net/sld
http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">

  <NamedLayer>

    <Name>green</Name>

    <UserStyle>

      <Name>green</Name>

      <Title>Green polygon</Title>

      <Abstract>Green fill with black outline</Abstract>

      <FeatureTypeStyle>

      <Rule>

          <PolygonSymbolizer>

          <Fill> 

          <CssParameter name="fill">#732615</CssParameter>

            <CssParameter name="fill-opacity">0.3</CssParameter>

         

           </Fill>

            <Stroke>

            <CssParameter name="stroke">#732615</CssParameter>

            <CssParameter name="stroke-opacity">0.8</CssParameter>

            <CssParameter name="stroke-width">1</CssParameter>

            </Stroke>

           </PolygonSymbolizer>

         </Rule>      

      </FeatureTypeStyle>

    </UserStyle>

  </NamedLayer>

</StyledLayerDescriptor>

 

   When the shape is rendered on the screen, the fill opacity is ignored.
Is there a way to correct this?

 

Thanks,
Jim

 

Jim Meyer

Java Programmer

ConceptSolutions, LLC

    We Make Business Intelligent

703.889.8434 [desk]

703.391.9041[fax]

www.Concept-Solutions.com

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091007/82586194/attachment.html


More information about the Users mailing list