Skip to content

gi-nx


gi-nx / getGeoTiff

ts
function getGeoTiff(): Promise<string>;

Export the current 2D map view as a GeoTiff image. Only works when map is in 2D mode.

Returns

Promise<string>

Promise resolving to a GeoTiff data URL, or undefined if not in 2D mode

Example

typescript
rpc.invoke("setTopView", ["2D"]);
const geoTiff = await rpc.invoke("getGeoTiff", []);
if (geoTiff) {
  // Download or process GeoTiff
}