Join us online - 19th of November
Save your spot
For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.

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?