UNPKG

kepler.gl

Version:

kepler.gl is a webgl based application to visualize large scale location data in the browser

54 lines (53 loc) 1.75 kB
import Layer from './base-layer'; import { Feature } from 'geojson'; /** * This function will convert layers to mapbox layers * @param layers the layers to be converted * @param layerData extra layer information * @param layerOrder the order by which we should convert layers * @param layersToRender {[id]: true | false} object whether each layer should be rendered * @returns */ export declare function generateMapboxLayers(layers?: Layer[], layerData?: any[], layerOrder?: string[], layersToRender?: { [key: string]: boolean; }): { [key: string]: Layer; }; declare type newLayersType = { [key: string]: Layer & Partial<{ data: any; sourceId: any; isVisible: boolean; }>; }; declare type oldLayersType = { [key: string]: Layer & { data?: any; }; }; /** * Update mapbox layers on the given map * @param map * @param newLayers Map of new mapbox layers to be displayed * @param oldLayers Map of the old layers to be compare with the current ones to detect deleted layers * {layerId: sourceId} */ export declare function updateMapboxLayers(map: any, newLayers?: newLayersType, oldLayers?: oldLayersType | null): void; /** * * @param filteredIndex * @param getGeometry {({index: number}) => any} * @param getProperties {({index: number}) => any} * @returns FeatureCollection */ export declare function geoJsonFromData(filteredIndex: number[] | undefined, getGeometry: (arg: { index: number; }) => any, getProperties: (arg: { index: number; }) => object): { type: string; features: Feature[]; }; export declare const prefixGpuField: (name: any) => string; export declare function gpuFilterToMapboxFilter(gpuFilter: any): any[] | null; export {};