You are here

Use different Symbol style in one layer (Geoserver)

Blog Terms: 

I have one layer in Geoserver, the data query is one table with geometry, there is one column named 'TYPE', which has 3 different type: 'rest', 'park', 'hotel'.
I need set 3 different color for this layer depends on 'TYPE', so custom SLD style should be defined in Geoserver like this:


<?xml version="1.0" encoding="ISO-8859-1" ?>

City

City Poi

TYPE
rest

circle

#FFFF00

6

TYPE
Hotel

circle

#FF0000

6

TYPE
Park

circle

#0000FF

6

Ref:
http://docs.geoserver.org/latest/en/user/styling/sld-reference/filters.html#examples
http://gis.stackexchange.com/questions/20966/geoserver-sld-using-propertyisequalto-and-propertyislike