Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleExample Area SLD
collapsetrue
<Rule>
	<Name>Ward</Name>
	<PolygonSymbolizer>
		<Fill>
			<CssParameter name="fill">#008000</CssParameter>
			<CssParameter name="fill-opacity">0.25</CssParameter>
		</Fill>
		<Stroke>
			<CssParameter name="stroke">#004000</CssParameter>
			<CssParameter name="stroke-width">2</CssParameter>
			<CssParameter name="stroke-opacity">1</CssParameter>
		</Stroke>
	</PolygonSymbolizer>
	<TextSymbolizer>
		<Label>
			<ogc:PropertyName>name</ogc:PropertyName>
		</Label>
		<Font>
			<CssParameter name="font-family">arlrdbd</CssParameter>
			<CssParameter name="font-size">11</CssParameter>
		</Font>
		<LabelPlacement>
			<PointPlacement>
				<AnchorPoint>
					<AnchorPointX>0.5</AnchorPointX>
					<AnchorPointY>0.5</AnchorPointY>
				</AnchorPoint>
				<Displacement>
					<DisplacementX>0</DisplacementX>
					<DisplacementY>0</DisplacementY>
				</Displacement>
			</PointPlacement>
		</LabelPlacement>
		<Fill>
			<CssParameter name="fill">#004000</CssParameter>
		</Fill>
		<Halo>
			<Radius>0</Radius>
			<Fill>
				<CssParameter name="fill"></CssParameter>
			</Fill>
		</Halo>
	</TextSymbolizer>
</Rule>

Best Practice

  • Use a WHERE clause in the SQL statement for your Layer to limit the features being displayed rather than using FILTER statements in the SLD styling. Only use FILTER statements to style the display of the visible features.

Using Multiple Rules

Status
colourYellow
title5.6.0+

...