kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
77 lines (76 loc) • 2.76 kB
TypeScript
/// <reference types="deck.gl" />
import { GeoJsonLayer } from '@deck.gl/layers';
import { EnhancedGridLayer } from '@kepler.gl/deckgl-layers';
import AggregationLayer, { AggregationLayerConfig } from '../aggregation-layer';
import GridLayerIcon from './grid-layer-icon';
import { ColorRange, VisConfigBoolean, VisConfigColorRange, VisConfigNumber, VisConfigRange, VisConfigSelection, Merge } from '@kepler.gl/types';
import { AggregationTypes } from '@kepler.gl/constants';
export declare type GridLayerVisConfigSettings = {
opacity: VisConfigNumber;
worldUnitSize: VisConfigNumber;
colorRange: VisConfigColorRange;
coverage: VisConfigNumber;
sizeRange: VisConfigRange;
percentile: VisConfigRange;
elevationPercentile: VisConfigRange;
elevationScale: VisConfigNumber;
enableElevationZoomFactor: VisConfigBoolean;
colorAggregation: VisConfigSelection;
sizeAggregation: VisConfigSelection;
enable3d: VisConfigBoolean;
};
export declare type GridLayerVisConfig = {
opacity: number;
worldUnitSize: number;
colorRange: ColorRange;
coverage: number;
sizeRange: [number, number];
percentile: [number, number];
elevationPercentile: [number, number];
elevationScale: number;
enableElevationZoomFactor: boolean;
colorAggregation: AggregationTypes;
sizeAggregation: AggregationTypes;
enable3d: boolean;
};
export declare type GridLayerConfig = Merge<AggregationLayerConfig, {
visConfig: GridLayerVisConfig;
}>;
export declare const gridVisConfigs: {
opacity: 'opacity';
worldUnitSize: 'worldUnitSize';
colorRange: 'colorRange';
coverage: 'coverage';
sizeRange: 'elevationRange';
percentile: 'percentile';
elevationPercentile: 'elevationPercentile';
elevationScale: 'elevationScale';
enableElevationZoomFactor: 'enableElevationZoomFactor';
fixedHeight: 'fixedHeight';
colorAggregation: 'colorAggregation';
sizeAggregation: 'sizeAggregation';
enable3d: 'enable3d';
};
export default class GridLayer extends AggregationLayer {
visConfigSettings: GridLayerVisConfigSettings;
config: GridLayerConfig;
constructor(props: any);
get type(): 'grid';
get layerIcon(): typeof GridLayerIcon;
renderLayer(opts: any): (EnhancedGridLayer | GeoJsonLayer<unknown, {
visible: any;
wrapLongitude: false;
data: ({
geometry: {
coordinates: any[];
type: string;
};
properties: any;
} | null)[];
getLineColor: import("@kepler.gl/types").RGBColor | import("@kepler.gl/types").RGBAColor;
lineWidthScale: number;
id: string;
pickable: boolean;
coordinateSystem: number;
}>)[];
}