Database Reference
In-Depth Information
8. Now,youneedtodefinethestyleusedtodisplaythelayertotheuser.Unlike
MapServer, GeoServer uses the OGC-standard
Styled Layer Descriptor
(
SLD
)notation.Clickonthe
Styles
linkunder
Data
andthenonthe
Add new
style
link. Fill the text fields in the form as follows:
• Enter
Counties classified per size
in the
Name
field
• Enter
postgis_cookbook
in the
Workspace
field
9. In the text area for the SLD, add the following XML code, defining the style
forthe
counties
layer;then,clickonthe
Validate
buttontocheckwhether
or not your SLD definition is correct. Finally, click on the
Submit
button to
save the new style:
<?xml version="1.0" encoding="UTF-8"?>
<sld:StyledLayerDescriptor
xmlns="http://www.opengis.net/sld"
xmlns:sld="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:gml="http://www.opengis.net/gml"
version="1.0.0">
<sld:NamedLayer>