import type { MapLibreOverlay as DeckOverlay } from '@deck.gl/maplibre'; import { COGLayer } from '@developmentseed/deck.gl-geotiff'; import type { DecoderPool, GeoTIFF } from '@developmentseed/geotiff'; import type { AddLayerObject, LngLatBoundsLike, MapLibreMap } from 'maplibre-gl'; import MapPreviewer from './map'; import { type ScalarRange, type ScalarTileData } from '../cog-pipeline'; import type CogResource from '../resources/cog'; import { type LayerState, type PreviewStyleLayer } from '../layers'; import type { Quantity } from '../quantity'; import type { MapLibreStyle } from '../themes/maplibre'; export default class CogPreviewer extends MapPreviewer { protected resource: CogResource; readonly reportsDrawing = true; protected deckOverlay: DeckOverlay | undefined; protected decoderPool: DecoderPool | undefined; protected drawnState: LayerState | undefined; protected geotiffBoundsLoaded: Promise | undefined; private resolveGeotiffBounds; protected geotiff: GeoTIFF | undefined; protected valueRange: ScalarRange | undefined; protected quantity: Quantity | undefined; protected anyTileDrawn: boolean; protected deckLayer: COGLayer | COGLayer | undefined; private loading; attach(map: MapLibreMap, style: MapLibreStyle): this; protected watchProjection(): void; private stopWatchingProjection; private handleProjectionTransition; protected syncLoading(): void; private setLoading; protected watchLoading(): void; private stopWatchingLoading; private handleRender; protected createSources(): Promise<[]>; protected createLayers(): Promise; protected getLayerId(): string; preview(): Promise; protected readQuantity(): Promise; protected loadGeoTIFF(): Promise; clearPreview(): Promise; protected applyStyleLayerState(_styleLayer: PreviewStyleLayer, state: LayerState): void; protected drawDeckLayer(): void; protected placeOnceIdle(): void; private handleIdle; protected createDeckLayer(geotiff: GeoTIFF, state: LayerState): COGLayer | COGLayer; protected reportTileDrawn(): void; protected reportTileError(error: unknown): void; protected createDecoderPool(): DecoderPool; getBounds(): Promise; getReportedBounds(): Promise; protected getDeckOverlay(): DeckOverlay; }