Geotools conditional Style based on attribute

Viewed 915

How do I style different elements of a layer differently, depending on the value of an attribute?

For example, I have time zone data which includes an attribute associating an integer from 1 to 8 to each time zone, for the purposes of colouring the time zones on a map. How can I associate a style to each value of the attribute, and use it to colour the time zones in different colours?

1 Answers
Related