GeoTools : Maps and styles

This brief tutorial discusses how to build a map out of a set of feature sources and styles and display it on the screen or save it as an image.

You will learn how to use the MapContext class for building maps, the SLD(Styled Layer Descriptor) styles to specify how to render features, the Renderer object to paint the map onto a surface, and the StyledMapPane to show a map on the screen.

Quick start

See the How to run the Spearfish demo page for help getting this tutorial code working with geotools binary (jar) releases.

Alternatively download the file (attached at the bottom of this tutorial) which just needs extracting and then most users should be able to double-click on the gt2-spearfishdemo.jar to run it.


MapContext.gif (image/gif)
Renderer.gif (image/gif)
Style.gif (image/gif) (application/x-zip)
spearfish.jpeg (image/jpeg)
DefaultMarkTest_org_geotools_renderer_lite_LiteRenderer.png (image/png) (application/octet-stream) (application/octet-stream)