UNPKG

kepler.gl

Version:

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

127 lines (126 loc) 4.86 kB
/// <reference types="react" /> import IconLayerIcon from './icon-layer-icon'; import Layer, { LayerBaseConfig, LayerBaseConfigPartial } from '../base-layer'; import { FindDefaultLayerPropsReturnValue } from '../layer-utils'; import { default as KeplerTable } from '@kepler.gl/table'; import { DataContainerInterface } from '@kepler.gl/utils'; import { ColorRange, VisConfigBoolean, VisConfigColorRange, VisConfigNumber, VisConfigRange, Merge, LayerColumn } from '@kepler.gl/types'; export declare type IconLayerColumnsConfig = { lat: LayerColumn; lng: LayerColumn; altitude: LayerColumn; icon: LayerColumn; }; declare type IconGeometry = object | null; export declare type IconLayerVisConfigSettings = { radius: VisConfigNumber; fixedRadius: VisConfigBoolean; opacity: VisConfigNumber; colorRange: VisConfigColorRange; radiusRange: VisConfigRange; }; export declare type IconLayerVisConfig = { radius: number; fixedRadius: boolean; opacity: number; colorRange: ColorRange; radiusRange: [number, number]; billboard: boolean; }; export declare type IconLayerConfig = Merge<LayerBaseConfig, { columns: IconLayerColumnsConfig; visConfig: IconLayerVisConfig; }>; export declare type IconLayerData = { index: number; icon: string; }; export declare const SVG_ICON_URL: string; export declare const iconPosAccessor: ({ lat, lng, altitude }: IconLayerColumnsConfig) => (dc: DataContainerInterface) => (d: any) => any[]; export declare const iconAccessor: ({ icon }: IconLayerColumnsConfig) => (dc: DataContainerInterface) => (d: any) => any; export declare const iconRequiredColumns: ['lat', 'lng', 'icon']; export declare const iconOptionalColumns: ['altitude']; export declare const pointVisConfigs: { radius: 'radius'; fixedRadius: 'fixedRadius'; opacity: 'opacity'; colorRange: 'colorRange'; radiusRange: 'radiusRange'; billboard: 'billboard'; }; export default class IconLayer extends Layer { getIconAccessor: (dataContainer: DataContainerInterface) => (d: any) => any; _layerInfoModal: () => JSX.Element; iconGeometry: IconGeometry; visConfigSettings: IconLayerVisConfigSettings; config: IconLayerConfig; constructor(props: { id?: string; iconGeometry?: IconGeometry; svgIcons?: any[]; } & LayerBaseConfigPartial); get svgIconUrl(): string; get type(): 'icon'; get requiredLayerColumns(): ["lat", "lng", "icon"]; get optionalColumns(): ["altitude"]; get columnPairs(): import("@kepler.gl/types").ColumnPairs; get layerIcon(): typeof IconLayerIcon; get visualChannels(): { color: { accessor: string; defaultValue: (config: any) => any; property: string; field: string; scale: string; domain: string; range: string; key: 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: { property: string; range: string; channelScaleType: string; accessor: string; defaultValue: number; field: string; scale: string; domain: string; key: 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; }; }; get layerInfoModal(): { id: string; template: () => JSX.Element; modalProps: { title: string; }; }; getZoomFactor({ zoom, zoomOffset }: { zoom: number; zoomOffset?: number; }): number; getSvgIcons(): void; setSvgIcons(svgIcons?: any[]): void; static findDefaultLayerProps({ fieldPairs, fields }: KeplerTable): FindDefaultLayerPropsReturnValue; getFilteredItemCount(): number | null; calculateDataAttribute({ dataContainer, filteredIndex }: KeplerTable, getPosition: any): IconLayerData[]; formatLayerData(datasets: any, oldLayerData: any): {}; updateLayerMeta(dataset: KeplerTable, getPosition: any): void; renderLayer(opts: any): any[]; } export {};