I have everything working on my GeoServer except for the labeling. I have searched and I cannot find any solution. I am by no means an expert.
I can modify the look/symbology of my polygons, lines, etc but when I add a style that utilizes a label, nothing shows up on my map. I have created new labels with the sld files I downloaded directly from GeoServer docs. I also changed the attribute field name that I want to use in my shapefile as the label. When I open the layer on the map, nothing shows up, not even the polygon.
I am sure I have not enabled something.
I am using GeoServer 2.4.1
Here is the sld I have recently tried:
http://docs.geoserver.org/stable/en/user/styling/sld-cookbook/polygons.html#label-halo
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NamedLayer>
<Name>Label halo</Name>
<UserStyle>
<Title>SLD Cook Book: Label halo</Title>
<FeatureTypeStyle>
<Rule>
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">#40FF40</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#FFFFFF</CssParameter>
<CssParameter name="stroke-width">2</CssParameter>
</Stroke>
</PolygonSymbolizer>
<TextSymbolizer>
<Label>
<ogc:PropertyName>name</ogc:PropertyName>
</Label>
<Halo>
<Radius>3</Radius>
<Fill>
<CssParameter name="fill">#FFFFFF</CssParameter>
</Fill>
</Halo>
</TextSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>