Programming with JViews Maps > Introducing the Main Classes > Readers and Writers > Map Export API

A convenient map export API is introduced in this version of JViews Maps to make it easier for the user to export a part of a map to different output formats.

Class for Exporting Selected Map Features

The main class is the IlvMapExportManager. This class is responsible for exporting selected map features of a map through specified export plugins known as IlvMapExporter implementations.

Exporters

IlvMapExporter is an interface that defines the expected methods of any object capable of writing map features in sequence.

Two kind of exporters can be set on the IlvMapExportManager:

They are set by calling the methods setVectorialExporter() and setRasterExporter() on an IlvMapExportManager instance.

A region of export can also be set on the IlvMapExportManager so that map features outside this region are not exported.

Once the two exporters of a IlvMapExportManager object are properly set and configured, an array of IlvMapLayer instances of the map may be exported with the method exportMapLayers().

The IlvMapExportDialog Class

The IlvMapExportDialog is a user-friendly dialog box class that lets the user choose:

exportDialog.png

Figure 1.10 Export Map Dialog Box

Vectorial and raster exporters are registered with this dialog box through the methods registerVectorExporter() and registerRasterExporter(), and similarly are removed by calling unregisterVectorExporter() and unregisterRasterExporter() methods.