The style added in the previous section is very basic. With point based data it is often desired to style the point with an existing glyph or icon. This section covers the task of modifying a point style to render a graphic contained in an existing image file.
From the Welcome Page return to the style editor by navigating Config ‣ Data ‣ Style. Select bus_stop_style from the drop down and click Edit.
Editing the bus_stops_style
Between the <PointSymbolizer></PointSymbolizer> tags add the following XML:
<Graphic>
<ExternalGraphic>
<OnlineResource xlink:type="simple" xlink:href="bus.png" />
<Format>image/png</Format>
</ExternalGraphic>
</Graphic>
Adding an external graphic
Note
The <ExternalGraphic> element is used to render a point using a pre-existing icon in a jpeg, gif, png, svg, etc... format. In this example an icon named bus.png is being used.
Submit, Apply, and Save changes.
Refresh the Map Preview.
The bus_stops_style rendered with an external graphic.
At this point the SLD created from scratch is more interesting than a red dot but is still lacking. The next few sections focus on adding improving the style.