I'm trying to style a vector (Point) Layer in Geoserver 2.8 by using a property (attribute field) of the underlying data source. Here's the snippet:

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

Where HEXCOLOR is a string like #fff000. However, the point is rendered with white filling.

I have so far checked

  • the data (Q-GIS is able to render the color definitions)
  • the syntax
  • 1
    Try with fill-opacity = 1.0
    – WKT
    Jun 6, 2016 at 15:22
  • I'd suggest to ask on geoserver-users, sharing a link to a data sample and full style. Jun 7, 2016 at 6:05
  • Do you really need the <ogc:PropertyName>...? For a polygonSymbolizer the following works for me: <sld:CssParameter name="fill">#FFCCB3</sld:CssParameter>
    – nmtoken
    Dec 24, 2016 at 11:05

1 Answer 1


I'm not familiar with that method, however you may use rule based styling for symbolizing various feature classifications:

Styling rules define the portrayal of features. A rule combines a filter with any number of symbolizers. Features for which the filter condition evaluates as true are rendered using the the symbolizers in the rule.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.