kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
63 lines (62 loc) • 2.46 kB
TypeScript
import { CompositeLayer, CompositeLayerProps, DefaultProps, GetPickingInfoParams, Layer, LayersList } from '@deck.gl/core/typed';
import type { ArcLayerProps } from '@deck.gl/layers/typed';
import * as arrow from 'apache-arrow';
import * as ga from '@geoarrow/geoarrow-js';
import { GeoArrowExtraPickingProps } from '../utils/picking';
import { ColorAccessor, FloatAccessor, GeoArrowPickingInfo } from '../types';
/** All properties supported by GeoArrowArcLayer */
export declare type GeoArrowArcLayerProps = Omit<ArcLayerProps<any>, 'data' | 'getSourcePosition' | 'getTargetPosition' | 'getSourceColor' | 'getTargetColor' | 'getWidth' | 'getHeight' | 'getTilt'> & _GeoArrowArcLayerProps & CompositeLayerProps;
/** Properties added by GeoArrowArcLayer */
declare type _GeoArrowArcLayerProps = {
data: arrow.Table;
/**
* Method called to retrieve the source position of each object.
*/
getSourcePosition: ga.vector.PointVector;
/**
* Method called to retrieve the target position of each object.
*/
getTargetPosition: ga.vector.PointVector;
/**
* The rgba color is in the format of `[r, g, b, [a]]`.
* @default [0, 0, 0, 255]
*/
getSourceColor?: ColorAccessor;
/**
* The rgba color is in the format of `[r, g, b, [a]]`.
* @default [0, 0, 0, 255]
*/
getTargetColor?: ColorAccessor;
/**
* The line width of each object, in units specified by `widthUnits`.
* @default 1
*/
getWidth?: FloatAccessor;
/**
* Multiplier of layer height. `0` will make the layer flat.
* @default 1
*/
getHeight?: FloatAccessor;
/**
* Use to tilt the arc to the side if you have multiple arcs with the same source and target positions.
* @default 0
*/
getTilt?: FloatAccessor;
/**
* If `true`, validate the arrays provided (e.g. chunk lengths)
* @default true
*/
_validate?: boolean;
};
export declare class GeoArrowArcLayer<ExtraProps extends object = object> extends CompositeLayer<GeoArrowArcLayerProps & ExtraProps> {
static defaultProps: DefaultProps<GeoArrowArcLayerProps>;
static layerName: string;
getPickingInfo(params: GetPickingInfoParams & {
sourceLayer: {
props: GeoArrowExtraPickingProps;
};
}): GeoArrowPickingInfo;
renderLayers(): Layer<object> | LayersList | null;
_renderLayersPoint(): Layer<object> | LayersList | null;
}
export {};