| java.lang.Object org.geotools.svg.GenerateSVG
GenerateSVG | public class GenerateSVG (Code) | | This is a simple support class which allows you to generate an SVG file from a map.
To use, setup a Map object with the layers you want to render, create an envelope for the
region to be drawn and pass in an OutputStream (probably attached to a new file) for the
resulting SVG information to be stored in.
Optionaly you can change the default size of the SVG cavas (in effect increasing the resolution)
by calling setCavasSize before calling go.
author: James Macgill, PennState version: $Id: GenerateSVG.java 27862 2007-11-12 19:51:19Z desruisseaux $ |
Constructor Summary | |
public | GenerateSVG() Creates a new instance of GenerateSVG. |
GenerateSVG | public GenerateSVG()(Code) | | Creates a new instance of GenerateSVG.
|
go | public void go(MapContext map, Envelope env, OutputStream out) throws IOException, ParserConfigurationException(Code) | | Generate an SVG document from the supplied information.
Note, call setCavasSize first if you want to change the default output size.
Parameters: map - Contains the layers (features + styles) to be rendered Parameters: env - The portion of the map to generate an SVG from Parameters: out - Stream to write the resulting SVG out to (probable should be a new file) throws: IOException - Should anything go wrong whilst writing to 'out' throws: ParserConfigurationException - If critical XML tools are missing from the classpath |
|
|