Map Export API

The map export API makes 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 plug-ins known as IlvMapExportManager.IlvMapExporter implementations.

Exporters

IlvMapExportManager.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:
  • A vectorial exporter, which handles all vectorial map features when exporting a map.
  • A raster exporter, which handles map features containing raster data.
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:
  • The exporters to use (from a list of registered exporters)
  • A list of map layers to export
  • A region of interest for the export
exportDialog.png
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.