kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
162 lines (161 loc) • 5.88 kB
TypeScript
import { GeoArrowArcLayer } from '@kepler.gl/deckgl-arrow-layers';
import { EnhancedLineLayer } from '@kepler.gl/deckgl-layers';
import LineLayerIcon from './line-layer-icon';
import { VisualChannel } from '../base-layer';
import ArcLayer, { ArcLayerConfig } from '../arc-layer/arc-layer';
import { ColorRange, Merge, RGBColor, VisConfigColorRange, VisConfigColorSelect, VisConfigNumber, VisConfigRange, LayerColumn } from '@kepler.gl/types';
import { default as KeplerTable } from '@kepler.gl/table';
import { DataContainerInterface } from '@kepler.gl/utils';
export declare type LineLayerVisConfigSettings = {
opacity: VisConfigNumber;
thickness: VisConfigNumber;
colorRange: VisConfigColorRange;
sizeRange: VisConfigRange;
targetColor: VisConfigColorSelect;
elevationScale: VisConfigNumber;
};
export declare type LineLayerColumnsConfig = {
lat0: LayerColumn;
lng0: LayerColumn;
lat1: LayerColumn;
lng1: LayerColumn;
alt0?: LayerColumn;
alt1?: LayerColumn;
lat: LayerColumn;
lng: LayerColumn;
alt: LayerColumn;
neighbors: LayerColumn;
geoarrow0: LayerColumn;
geoarrow1: LayerColumn;
};
export declare type LineLayerVisConfig = {
colorRange: ColorRange;
opacity: number;
sizeRange: [number, number];
targetColor: RGBColor;
thickness: number;
elevationScale: number;
};
export declare type LineLayerConfig = Merge<ArcLayerConfig, {
columns: LineLayerColumnsConfig;
visConfig: LineLayerVisConfig;
}>;
export declare const lineRequiredColumns: ['lat0', 'lng0', 'lat1', 'lng1'];
export declare const lineOptionalColumns: ['alt0', 'alt1'];
export declare const neighborRequiredColumns: string[];
export declare const neighborOptionalColumns: string[];
export declare const geoarrowRequiredColumns: string[];
export declare const lineColumnLabels: {
lat0: string;
lng0: string;
lat1: string;
lng1: string;
alt0: string;
alt1: string;
};
export declare const lineVisConfigs: {
opacity: 'opacity';
thickness: 'thickness';
colorRange: 'colorRange';
sizeRange: 'strokeWidthRange';
targetColor: 'targetColor';
elevationScale: VisConfigNumber;
};
export declare const COLUMN_MODE_POINTS = "points";
export declare const COLUMN_MODE_NEIGHBORS = "neighbors";
export declare const COLUMN_MODE_GEOARROW = "geoarrow";
export declare const linePosAccessor: ({ lat0, lng0, lat1, lng1, alt0, alt1, lat, lng, alt, geoarrow0, geoarrow1 }: LineLayerColumnsConfig, columnMode: any) => (dc: DataContainerInterface) => (d: any) => any[];
export default class LineLayer extends ArcLayer {
visConfigSettings: LineLayerVisConfigSettings;
config: LineLayerConfig;
constructor(props: any);
get type(): string;
get layerIcon(): typeof LineLayerIcon;
get columnLabels(): {
lat0: string;
lng0: string;
lat1: string;
lng1: string;
alt0: string;
alt1: string;
};
get columnPairs(): import("@kepler.gl/types").ColumnPairs;
get supportedColumnModes(): ({
key: string;
label: string;
requiredColumns: string[];
optionalColumns: string[];
} | {
key: string;
label: string;
requiredColumns: string[];
optionalColumns?: undefined;
})[];
get visualChannels(): {
sourceColor: {
accessor: string;
property: string;
key: string;
defaultValue: (config: any) => any;
field: string;
scale: string;
domain: string;
range: string;
channelScaleType: string;
nullValue?: any;
defaultMeasure?: any;
condition?: ((config: any) => boolean) | undefined;
getAttributeValue?: ((config: any) => (d: any) => any) | undefined;
fixed?: any;
supportedFieldTypes?: import("@kepler.gl/types").SupportedFieldTypes[] | undefined;
aggregation?: import("@kepler.gl/types").VisualChannelAggregation | undefined;
};
targetColor: {
property: string;
key: string;
accessor: string;
defaultValue: (config: any) => any;
field: string;
scale: string;
domain: string;
range: string;
channelScaleType: string;
nullValue?: any;
defaultMeasure?: any;
condition?: ((config: any) => boolean) | undefined;
getAttributeValue?: ((config: any) => (d: any) => any) | undefined;
fixed?: any;
supportedFieldTypes?: import("@kepler.gl/types").SupportedFieldTypes[] | undefined;
aggregation?: import("@kepler.gl/types").VisualChannelAggregation | undefined;
};
size: {
accessor: string;
property: string;
field: string;
scale: string;
domain: string;
range: string;
key: string;
channelScaleType: string;
nullValue?: any;
defaultMeasure?: any;
condition?: ((config: any) => boolean) | undefined;
defaultValue?: any;
getAttributeValue?: ((config: any) => (d: any) => any) | undefined;
fixed?: any;
supportedFieldTypes?: import("@kepler.gl/types").SupportedFieldTypes[] | undefined;
aggregation?: import("@kepler.gl/types").VisualChannelAggregation | undefined;
};
};
static findDefaultLayerProps({ fieldPairs }: KeplerTable): {
props: {
color?: RGBColor;
columns: LineLayerColumnsConfig;
label: string;
}[];
};
renderLayer(opts: any): (EnhancedLineLayer | GeoArrowArcLayer<object>)[];
getLegendVisualChannels(): {
[key: string]: VisualChannel;
};
}