UNPKG

kepler.gl

Version:

kepler.gl is a webgl based application to visualize large scale location data in the browser

80 lines (79 loc) 2.89 kB
import { CompositeLayer, CompositeLayerProps, DefaultProps, GetPickingInfoParams, Layer, LayersList } from '@deck.gl/core/typed'; import type { TextLayerProps } from '@deck.gl/layers'; 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 GeoArrowTextLayer */ export declare type GeoArrowTextLayerProps = Omit<TextLayerProps<arrow.Table>, 'background' | 'data' | 'getBackgroundColor' | 'getBorderColor' | 'getBorderWidth' | 'getText' | 'getPosition' | 'getColor' | 'getSize' | 'getAngle' | 'getTextAnchor' | 'getAlignmentBaseline' | 'getPixelOffset'> & _GeoArrowTextLayerProps & CompositeLayerProps; /** Properties added by GeoArrowTextLayer */ declare type _GeoArrowTextLayerProps = { data: arrow.Table; /** Background color accessor. * @default [255, 255, 255, 255] */ getBackgroundColor?: ColorAccessor; /** Border color accessor. * @default [0, 0, 0, 255] */ getBorderColor?: ColorAccessor; /** Border width accessor. * @default 0 */ getBorderWidth?: FloatAccessor; /** * Label text accessor */ getText: arrow.Vector<arrow.Utf8>; /** * Anchor position accessor */ getPosition?: ga.vector.PointVector; /** * Label color accessor * @default [0, 0, 0, 255] */ getColor?: ColorAccessor; /** * Label size accessor * @default 32 */ getSize?: FloatAccessor; /** * Label rotation accessor, in degrees * @default 0 */ getAngle?: FloatAccessor; /** * Horizontal alignment accessor * @default 'middle' */ getTextAnchor?: arrow.Vector<arrow.Utf8> | 'start' | 'middle' | 'end'; /** * Vertical alignment accessor * @default 'center' */ getAlignmentBaseline?: arrow.Vector<arrow.Utf8> | 'top' | 'center' | 'bottom'; /** * Label offset from the anchor position, [x, y] in pixels * @default [0, 0] */ getPixelOffset?: arrow.Vector<arrow.FixedSizeList<arrow.Int>> | [number, number]; /** * If `true`, validate the arrays provided (e.g. chunk lengths) * @default true */ _validate?: boolean; }; export declare class GeoArrowTextLayer<ExtraProps extends object = object> extends CompositeLayer<GeoArrowTextLayerProps & ExtraProps> { static defaultProps: DefaultProps<GeoArrowTextLayerProps>; static layerName: string; getPickingInfo(params: GetPickingInfoParams & { sourceLayer: { props: GeoArrowExtraPickingProps; }; }): GeoArrowPickingInfo; renderLayers(): Layer<object> | LayersList | null; _renderLayersPoint(geometryColumn: ga.vector.PointVector): Layer<object> | LayersList | null; } export {};