kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
43 lines (42 loc) • 1.64 kB
TypeScript
import AggregationLayer, { AggregationLayerConfig } from '../aggregation-layer';
import { ScatterplotLayer } from '@deck.gl/layers';
import { DeckGLClusterLayer } from '@kepler.gl/deckgl-layers';
import ClusterLayerIcon from './cluster-layer-icon';
import { ColorRange, Merge, VisConfigColorRange, VisConfigNumber, VisConfigRange, VisConfigSelection } from '@kepler.gl/types';
import { AggregationTypes } from '@kepler.gl/constants';
import { VisualChannels } from '../base-layer';
export type ClusterLayerVisConfigSettings = {
opacity: VisConfigNumber;
clusterRadius: VisConfigNumber;
colorRange: VisConfigColorRange;
radiusRange: VisConfigRange;
colorAggregation: VisConfigSelection;
};
export type ClusterLayerVisConfig = {
opacity: number;
clusterRadius: number;
colorRange: ColorRange;
radiusRange: [number, number];
colorAggregation: AggregationTypes;
};
export type ClusterLayerConfig = Merge<AggregationLayerConfig, {
visConfig: ClusterLayerVisConfig;
}>;
export declare const clusterVisConfigs: {
opacity: 'opacity';
clusterRadius: 'clusterRadius';
colorRange: 'colorRange';
radiusRange: 'clusterRadiusRange';
colorAggregation: 'colorAggregation';
};
export default class ClusterLayer extends AggregationLayer {
visConfigSettings: ClusterLayerVisConfigSettings;
config: ClusterLayerConfig;
constructor(props: any);
get type(): 'cluster';
get layerIcon(): typeof ClusterLayerIcon;
get visualChannels(): VisualChannels;
renderLayer(opts: any): (DeckGLClusterLayer | ScatterplotLayer<{
scaledRadiusValue: number;
}, {}>)[];
}