ExportWebFormat

globalmapper.ExportWebFormat(str aFilename, GM_WebExportFormat_t32 aWebFormat, [GM_LayerHandle_t32] aLayerList, GM_Rectangle_t aWorldBounds, GM_WebFormatExportOpts_t aExportOpts, str aExtraFlags) GM_Error_t32[source]

Exports one or more layers to a files to a web format for display in a web browser or other web-based tool. If None is passed for the layer handle list, all layers will be saved to the new data set, otherwise only the specified layers will be exported. If None is provided for the world bounds, all available data will be exported, otherwise only data within the specified bounds will be exported.

The aExtraFlags parameter allows the specification of any extra options not supports in the aExportOpts parameter. The options should be specified with the option name, followed by an equal sign, followed by the option value. Most users will pass None or an empty string for this value unless they need a non-default value for an extra option. Currently the following extra options are supported:

  • QUALITY (JPG or GeoTIFF formats only) - specifies the export quality value. Values should range from 1 to 100. The default is 75. Higher values result in a higher quality, but larger result. For example, to set the quality to 90, use “QUALITY=90” as your extra flags value. For GeoTIFF exports this is only used for an export using JPG-in-TIFF compression.

Parameters:
  • aFilename (str) – Name of HTML/XML file to create

  • aWebFormat (GM_WebExportFormat_t32) – Format to export

  • aLayerList ([GM_LayerHandle_t32]) – List of layers to export or None for all

  • aWorldBounds (GM_Rectangle_t) – World bounds to export or None for all

  • aExportOpts (GM_WebFormatExportOpts_t) – Export options

  • aExtraFlags (str) – Additional text-based flags for some formats (use None for defaults)

Returns:

Error Code

Return type:

GM_Error_t32