import { CompositeLayer } from '@deck.gl/core'; import type { DefaultProps, UpdateParameters } from '@deck.gl/core'; type GeometryType = 'Point' | 'MultiPoint' | 'LineString' | 'MultiLineString' | string; type FeatureGeometry = { type: GeometryType; coordinates: any; }; type FeatureLike = { geometry: FeatureGeometry; properties?: Record; }; type LabelRow = { position: number[]; }; type StyleLayerLike = { layout?: Record; }; type LabelConfig = { labels?: boolean; }; /** * Props accepted by {@link MVTLabelLayer}. */ export type MVTLabelLayerProps = { /** Decoded vector-tile features or a feature-collection-like object. */ data?: { features?: FeatureLike[]; } | FeatureLike[]; /** Label rendering enablement for the current basemap mode. */ config: LabelConfig; /** Style layer that contributes label rules. */ styleLayer?: StyleLayerLike; /** Zoom level used to resolve stop-based style values. */ zoom?: number; /** Text fill color. */ textColor?: number[]; /** Optional text halo/background color. */ labelBackground?: number[] | null; /** Text size units forwarded to `TextLayer`. */ labelSizeUnits?: 'pixels' | 'meters' | 'common'; /** Font family used by `TextLayer`. */ fontFamily?: string; /** Enables billboard rendering in the text sublayer. */ billboard?: boolean; /** When `true`, renders the source geometries for debugging. */ renderGeometry?: boolean; /** Additional extension instances passed through to the text sublayer. */ extensions?: any[]; /** Active basemap mode. */ mode?: 'map' | 'globe'; }; type MVTLabelLayerState = { /** Flattened label rows generated from the current tile data. */ labelData?: LabelRow[]; }; /** * Renders label text for decoded vector-tile features, with optional geometry * passthrough for debugging. */ export declare class MVTLabelLayer extends CompositeLayer { /** Deck.gl layer name. */ static layerName: string; /** Default props for {@link MVTLabelLayer}. */ static defaultProps: DefaultProps; /** Current label-row state. */ state: MVTLabelLayerState; /** * Extracts the visible label text for a decoded feature. */ getLabel(feature: FeatureLike): string | undefined; /** * Returns the font size for a decoded feature label. */ getLabelSize(_feature: FeatureLike): number; /** * Returns the text color for a decoded feature label. */ getLabelColor(_feature: FeatureLike): number[]; /** * Extracts candidate label anchor positions from a feature geometry. */ getLabelAnchors(feature: FeatureLike): number[][]; /** * Recomputes label anchor rows when the source tile data changes. */ updateState({ changeFlags }: UpdateParameters): void; /** * Renders the optional debug geometry and the text labels. */ renderLayers(): any; } export {}; //# sourceMappingURL=mvt-label-layer.d.ts.map