On this page

Function takeScreenshot

  • Takes a screenshot (PNG file) of the curent map view. Depending on the options, this function can automatically trigger a download of te file.

    Parameters

    • map: Map
    • options: { download?: boolean; filename?: string } = {}
      • Optionaldownload?: boolean

        If true, this function will trigger a download in addition to returning a blob. Default: false

      • Optionalfilename?: string

        Only if options.download is true. Indicates the filename under which the file will be downloaded. Default: "maptiler_screenshot.png"

    Returns Promise<Blob>

Was this helpful?
SDK JS
Reference
takeScreenshot