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

Pere Roca Ristol peroc79 at gmail.com
Thu Oct 8 01:36:14 EDT 2009



  have you tested with "normal" PNG? 
  I have seen in
http://www.sitepoint.com/blogs/2007/09/18/png8-the-clear-winner/ that with
png8 pixels are either solid or completely transparent, but never partially
see-through.

  Geoserver 1.6.2 had a bug with png8 and empty images (not your case)
transparency.

  Pere


jim.meyer wrote:
> 
> 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
> 
>  
> 
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://n2.nabble.com/Using-an-SLD-from-Geoserver-in-my-WMS-request-and-the-opacity-isn-t-working-for-the-fill-tp3783294p3786076.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list