kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
54 lines (53 loc) • 1.92 kB
TypeScript
import { Blob } from 'global/window';
import { RESOLUTIONS, EXPORT_IMG_RATIOS, ExportImage } from '@kepler.gl/constants';
/**
* Default file names
*/
export declare const DEFAULT_IMAGE_NAME = "kepler.gl.png";
export declare const DEFAULT_HTML_NAME = "kepler.gl.html";
export declare const DEFAULT_JSON_NAME = "kepler.gl.json";
export declare const DEFAULT_DATA_NAME = "kepler.gl";
/**
* Default json export settings
*/
export declare const DEFAULT_EXPORT_JSON_SETTINGS: {
hasData: boolean;
};
export declare function isMSEdge(window: Window): boolean;
export declare function getScaleFromImageSize(imageW?: number, imageH?: number, mapW?: number, mapH?: number): number;
export declare function calculateExportImageSize({ mapW, mapH, ratio, resolution }: {
mapW: number;
mapH: number;
ratio: keyof typeof EXPORT_IMG_RATIOS;
resolution: keyof typeof RESOLUTIONS;
}): {
scale: number | undefined;
imageW: number;
imageH: number;
} | null;
export declare function convertToPng(sourceElem: HTMLElement, options: any): Promise<any>;
export declare function dataURItoBlob(dataURI: string): Blob;
export declare function downloadFile(fileBlob: Blob, fileName: string): void;
/**
* Whether color is rgb
* @returns
*/
export declare function exportImage(uiStateExportImage: ExportImage, filename?: string): void;
export declare function exportToJsonString(data: any): any;
export declare function getMapJSON(state: any, options?: {
hasData: boolean;
}): any;
export declare function exportJson(state: any, options?: any): void;
export declare function exportHtml(state: any, options: any): void;
export declare function exportMap(state: any, options?: {
hasData: boolean;
}): {
map: any;
thumbnail: any;
};
declare const exporters: {
exportImage: typeof exportImage;
exportJson: typeof exportJson;
exportHtml: typeof exportHtml;
};
export default exporters;