kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
94 lines (93 loc) • 4.46 kB
TypeScript
import { RGBAColor } from '@kepler.gl/types';
export declare type UpdaterType = (this: CPUAggregator, step: any, props: any, dimensionUpdater: any) => void;
export declare type BindedUpdaterType = () => void;
export declare type AggregatedUpdaterType = (this: CPUAggregator, step: any, props: any, aggregation: any, aggregationParams: any) => void;
export declare type BindedAggregatedUpdaterType = (aggregationParams: any) => void;
export declare type UpdateStepsType = {
key: string;
triggers: {
[key: string]: {
prop: string;
updateTrigger?: string;
};
};
onSet?: {
props: string;
};
updater: UpdaterType;
};
export declare type DimensionType<ValueType = any> = {
key: string;
accessor: string;
getPickingInfo: (dimensionState: any, cell: any, layerProps?: any) => any;
nullValue: ValueType;
updateSteps: UpdateStepsType[];
getSubLayerAccessor: any;
};
export declare type AggregationUpdateStepsType = {
key: string;
triggers: {
[key: string]: {
prop: string;
updateTrigger?: string;
};
};
updater: AggregatedUpdaterType;
};
export declare type AggregationType = {
key: string;
updateSteps: AggregationUpdateStepsType[];
};
export declare const DECK_AGGREGATION_MAP: {
[x: number]: "sum" | "average" | "minimum" | "maximum";
};
export declare function getValueFunc(aggregation: any, accessor: any): (pts: any) => any;
export declare function getScaleFunctor(scaleType: any): any;
export declare function getGetValue(this: CPUAggregator, step: any, props: any, dimensionUpdater: any): void;
export declare function getDimensionSortedBins(this: CPUAggregator, step: any, props: any, dimensionUpdater: any): void;
export declare function getDimensionValueDomain(this: CPUAggregator, step: any, props: any, dimensionUpdater: any): void;
export declare function getDimensionScale(this: CPUAggregator, step: any, props: any, dimensionUpdater: any): void;
export declare function getAggregatedData(this: CPUAggregator, step: any, props: any, aggregation: any, aggregationParams: any): void;
export declare const defaultAggregation: AggregationType;
export declare const defaultColorDimension: DimensionType<RGBAColor>;
export declare const defaultElevationDimension: DimensionType<number>;
export declare const defaultDimensions: (DimensionType<RGBAColor> | DimensionType<number>)[];
export declare type CPUAggregatorState = {
layerData: {
data?: any;
};
dimensions: object;
geoJSON?: any;
clusterBuilder?: any;
};
export default class CPUAggregator {
static getDimensionScale: any;
state: CPUAggregatorState;
dimensionUpdaters: {
[key: string]: DimensionType;
};
aggregationUpdater: AggregationType;
constructor(opts?: {
initialState?: CPUAggregatorState;
dimensions?: DimensionType[];
aggregation?: AggregationType;
});
static defaultDimensions(): (DimensionType<RGBAColor> | DimensionType<number>)[];
updateAllDimensions(props: any): void;
updateAggregation(props: any, aggregationParams: any): void;
updateState(opts: any, aggregationParams: any): CPUAggregatorState;
setState(updateObject: any): void;
_setDimensionState(key: any, updateObject: any): void;
_addAggregation(aggregation: AggregationType): void;
_addDimension(dimensions?: DimensionType[]): void;
_needUpdateStep(dimensionStep: UpdateStepsType | AggregationUpdateStepsType, oldProps: any, props: any, changeFlags: any): boolean;
_accumulateUpdaters<UpdaterObjectType extends DimensionType | AggregationType>(step: any, props: any, dimension: UpdaterObjectType): (UpdaterObjectType extends DimensionType<any> ? BindedUpdaterType : BindedAggregatedUpdaterType)[];
_getAllUpdaters<UpdaterObjectType extends DimensionType | AggregationType>(dimension: UpdaterObjectType, oldProps: any, props: any, changeFlags: any): (UpdaterObjectType extends DimensionType<any> ? BindedUpdaterType : BindedAggregatedUpdaterType)[];
_getAggregationChanges(oldProps: any, props: any, changeFlags: any): BindedAggregatedUpdaterType[] | null;
_getDimensionChanges(oldProps: any, props: any, changeFlags: any): BindedUpdaterType[] | null;
getUpdateTriggers(props: any): {};
getPickingInfo({ info }: {
info: any;
}, layerProps: any): any;
getAccessor(dimensionKey: any, layerProps: any): any;
}