import type { CompositeLayerProps, DefaultProps, GetPickingInfoParams, Layer, LayerContext, LayersList, UpdateParameters } from "@deck.gl/core"; import { CompositeLayer } from "@deck.gl/core"; import type { SolidPolygonLayerProps } from "@deck.gl/layers"; import * as ga from "@geoarrow/geoarrow-js"; import type * as arrow from "apache-arrow"; import type { FunctionThread } from "threads"; import { Pool } from "threads"; import type { PoolOptions } from "threads/dist/master/pool"; import type { ColorAccessor, FloatAccessor, GeoArrowPickingInfo } from "../types"; import type { GeoArrowExtraPickingProps } from "../utils/picking"; /** A helper function to initialize a worker threadpool for earcut */ export declare function initEarcutPool(earcutWorkerUrl?: string | URL | null, optionsOrSize?: number | PoolOptions): Promise | null>; /** All properties supported by GeoArrowSolidPolygonLayer */ export type GeoArrowSolidPolygonLayerProps = Omit & _GeoArrowSolidPolygonLayerProps & CompositeLayerProps; /** Properties added by GeoArrowSolidPolygonLayer */ type _GeoArrowSolidPolygonLayerProps = { data: arrow.RecordBatch; /** Polygon geometry accessor. */ getPolygon?: ga.data.PolygonData | ga.data.MultiPolygonData; /** Extrusion height accessor. * @default 1000 */ getElevation?: FloatAccessor; /** Fill color accessor. * @default [0, 0, 0, 255] */ getFillColor?: ColorAccessor; /** Stroke color accessor. * @default [0, 0, 0, 255] */ getLineColor?: ColorAccessor; /** * If `true`, validate the arrays provided (e.g. chunk lengths) * @default true */ _validate?: boolean; /** If `true`, print metrics via `console.time`. * * This is primarily used for logging the time required for earcut * triangulation. */ metrics?: boolean; /** A worker pool for earcut triangulation. * * You can use the `initEarcutPool` helper function to create a pool. This is * helpful if you're rendering many Polygon layers and want to share a pool * between them. * * If not provided, a pool will be created automatically. * * As of v0.4, layers have been refactored to take in a _RecordBatch_ as * input, instead of a table. This means that if a worker pool is created as * part of this layer, it will only be used once. To take advantage of the * pool, ideally you should create it externally and pass it in via this prop. */ earcutWorkerPool?: Pool | null; /** * URL to worker that performs earcut triangulation. * * By default this loads from the jsdelivr CDN, but end users may want to host * this on their own domain. */ earcutWorkerUrl?: string | URL | null; /** * The number of workers used for the earcut thread pool. */ earcutWorkerPoolSize?: number; }; export declare class GeoArrowSolidPolygonLayer extends CompositeLayer { static defaultProps: DefaultProps; static layerName: string; state: CompositeLayer["state"] & { batch: arrow.RecordBatch | null; triangles: Uint32Array | null; earcutWorkerPool: Pool | null; earcutWorkerRequest: Promise | null; }; initializeState(_context: LayerContext): void; initEarcutPool(): Promise | null>; finalizeState(_context: LayerContext): Promise; updateData(): Promise; _updateEarcut(batch: arrow.RecordBatch): Promise; _earcutPolygonData(polygonData: ga.data.PolygonData): Promise; _earcutPolygonVectorMainThread(polygonData: ga.data.PolygonData): Uint32Array; _earcutMultiPolygonData(multiPolygonData: ga.data.MultiPolygonData): Promise; _earcutMultiPolygonVectorMainThread(multiPolygonData: ga.data.MultiPolygonData): Uint32Array; updateState({ changeFlags }: UpdateParameters): void; getPickingInfo(params: GetPickingInfoParams & { sourceLayer: { props: GeoArrowExtraPickingProps; }; }): GeoArrowPickingInfo; renderLayers(): Layer | LayersList | null; _renderPolygonLayer(polygonData: ga.data.PolygonData): Layer | LayersList | null; _renderMultiPolygonLayer(multiPolygonData: ga.data.MultiPolygonData): Layer | LayersList | null; } export {}; //# sourceMappingURL=solid-polygon-layer.d.ts.map