Page tree
Skip to end of metadata
Go to start of metadata

Introduced in




Exports the current map as a file in any of the following formats:

  • MBTiles (V20.1+)
  • PDF
  • PNG (V20.2+)
  • SVG (V20.1+)
  • TIFF (V20.2+)

For known issues, see Notes.


Syntax:exportMap [path, scale, x, y, w, h, detail, grid, relief, type, externalOverlay]
  • path: String - Output folder name (created, if it does not exist yet). Can either be an absolute or relative path (relative in relation to the VBS installation folder). The name of the created file consists of the map name, followed by creation time.
  • scale: Number - Map scale to use for output (for example, 2500 means 1:2500).
  • x: Number - Leftmost x-value of exported area (in-game coordinates) (optional, default: 0).
  • y: Number - Bottom y-value of exported area (in-game coordinates) (optional, default: 0).
  • w: Number - Width (in meters) of the area to export. If < 0, then everything to the right of 'x' is exported (optional, default: -1).
  • h: Number - Height (in meters) of the area to export. If < 0, then everything above 'y' is exported (optional, default: -1).
  • detail: Number - Level of detail to export (between .001 and 1, for maximum detail) (optional, default depends on the defined scale).
  • grid: String - Grid type to show. Can be "BNG" (V3.8.1+), "MGRS", "UTM", "LL" (Lat,Long), "LLMS" (Lat,Long in D°M'S), "current" (grid system on current game map) or "none".
  • relief: Boolean - If true, then the output shows relief features (indicating elevations) (optional, default: false).
  • type: String - Can be any of the following (optional, default: "PDF") (V17.2.0+):
    • "MBTiles"
    • "PDF"
    • "PNG"
    • "SVG"
    • "TIFF"
  • externalOverlay: Boolean - If true, then the output includes overlays generated by external components (optional, default: false) (V18.3.0+).
Return Value:Boolean - If true, then the map is exported successfully.



Same map output with and without relief option:

exportMap["export",30000,2000,1400,1800,2500,1,"current",true]; // left image
exportMap["export",30000,2000,1400,1800,2500,1,"current",false]; // right image

Additional Information

See also: exportEMF, exportSHP, exportMapSHP, exportASCIIGrid


High-detail export (1:2500) of larger maps can take several minutes, and export of multi-maps can take many hours. It is recommended to use a lower detail export (1:50000 or lower) for multi-maps.