[mapserver-users] GetStyles SLD does not include Opacity value

myOpenLayersUName joanne.mcgraw at SYMPATICO.CA
Tue Jun 5 07:32:00 PDT 2012


"Are we missing a few things like the response and the mapfile snippet? Also
are you talking layer opacity or style opacity?"

I guess the email-er that sent around the post didn't include anything
within the "raw" tags. Here's the full text again (without the tags):

I have a Map file with a polygon layer that has an OPACITY value of 20
defined as:

  LAYER
   NAME "Poly_wOpacity"
   TYPE POLYGON
   OPACITY 20
   STATUS ON
   PROJECTION
     "init=epsg:3857"
   END
   INCLUDE "../../../mapserv/conf/sdeconnection.inc.map"
   DATA "...,SHAPE,SDE.DEFAULT"
   METADATA
     "wms_title"         "Polygon Layer w/Opacity of 20"
     "wms_srs"           "epsg:3857"
   END
   CLASS
     NAME "Polygon Layer w/Opacity of 20"
     STYLE
       COLOR 255 0 0
     END
   END
  END

I see a correctly opaque display when I do a GetMap or a GetLegendGraphic,
so I know the OPACITY value is set properly. However, when I perform a
GetStyles request, the returned SLD doesn't include anything about the
opacity. The response is:

  <StyledLayerDescriptor version="1.0.0" ...>
    <NamedLayer>
        <Name>Poly_wOpacity</Name>
        <UserStyle>
            <FeatureTypeStyle>
                <Rule>
                    <Name>Polygon Layer w/Opacity of 20</Name>
                    <PolygonSymbolizer>
                        <Fill>
                            <CssParameter name="fill">#ff0000</CssParameter>
                        </Fill>
                    </PolygonSymbolizer>
                </Rule>
            </FeatureTypeStyle>
        </UserStyle>
    </NamedLayer>
  </StyledLayerDescriptor>

Am I wrong to expect to see a "fill-opacity" CssParameter for this layer? I
am using Mapserver 6.0.1 and, since it might have some bearing of this
question, the OUTPUTFORMAT for the map is defined as follows:
  
    OUTPUTFORMAT
      NAME png32
      DRIVER "AGG/PNG"
      MIMETYPE "image/png"
      IMAGEMODE RGBA
      EXTENSION png
      FORMATOPTION "INTERLACE=OFF"
      TRANSPARENT ON
    END

If there is some pointers someone can offer to get this information returned
properly, I'd appreciate it.

Cheers,
jtm 


--
View this message in context: http://osgeo-org.1560.n6.nabble.com/GetStyles-SLD-does-not-include-Opacity-value-tp4979066p4979230.html
Sent from the Mapserver - User mailing list archive at Nabble.com.


More information about the mapserver-users mailing list