kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
77 lines (76 loc) • 2.72 kB
TypeScript
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 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 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 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<any, {
visible: any;
wrapLongitude: false;
data: {
type: "Feature";
properties: {};
geometry: {
coordinates: any;
type: "LineString";
};
}[];
getLineColor: import("@kepler.gl/types").RGBColor | import("@kepler.gl/types").RGBAColor;
lineWidthScale: number;
id: string;
pickable: boolean;
coordinateSystem: 1;
}>)[];
}