Skip to end of metadata
Go to start of metadata

A Renderer is an object that draws a map described by a MapContext onto a Graphics2D object. You can get a Graphics2D object from the paint event of a JComponent, or from the printer objects, or from a BufferedImage so that you can save the map as an image.

Misc.

It exists two rendered by default

As you can see, there are two interfaces, Renderer and Renderer2D, which overlap with each other. The problem here is that interactive map rendering and related components are the bleeding edge frontier of Geotools2, and still lack design and coding. As a result, these are still a bit messy and unfinished. Anyway, for the moment you can safely use the Renderer interface, which is supported by both of the renderers.
If you have a special need you can build the RenderedLayers on your own, but if you just want to display a MapContext, look for the StyledMapPane that has native support for the MapContext object.

Finally, if you need to display the map on the screen you can use the StyleMapPane object and you can even display an interactive legend editor with the legend component. Beware! The Swing components for the map display need to be reworked into a sound architecture that we still need to design. Some help from interested parties in this field would really be appreciated, either by providing design ideas or coding time.

  • No labels