spatial-monorepo / core/src / exportToPNG
Function: exportToPNG()
exportToPNG(
map,options?):Promise`<Blob>`
Defined in: packages/core/src/export/mapExport.ts:65
Export the current map view as a PNG Blob and trigger a browser download.
Issue #429 — forces a fresh WebGL paint via map.triggerRepaint() and reads the canvas synchronously inside the next 'render' event so the export is never blank, regardless of the map's preserveDrawingBuffer setting (see getRenderedCanvas).
Parameters
map
Map$1
options?
ExportOptions = {}
Returns
Promise`<Blob>`
