UNPKG

@maptiler/weather

Version:

Weather layers for MapTiler Cloud and MapTiler SDK

42 lines (41 loc) 1.39 kB
import { Map as MapSDK } from '@maptiler/sdk'; import { ColorRamp } from '../../core/ColorRamp'; import { TileLayer } from '../TileLayer/TileLayer'; import { RadarLayerOptions, RadarPickAt } from './types'; /** * The RadarLayer shows the atmospheric radar in centigrade */ declare class RadarLayer extends TileLayer { private constructorOptions; private isSourceReady; private colorRamp; constructor(options?: RadarLayerOptions); onAdd(map: MapSDK, gl: WebGLRenderingContext | WebGL2RenderingContext): Promise<void>; /** * Check if the data source that fuels the layer has been fully fetched and processed * @returns */ getIsSourceReady(): boolean; /** * Get the radar reflectivity in dBZ at a given location * @param lng * @param lat * @param options: bilinear interpolation (boolean) is disabled by default for better performance * @returns */ pickAt(lng: number, lat: number, options?: { bilinear?: boolean; }): RadarPickAt; /** * Get the color ramp in use by the layer * @returns */ getColorRamp(): Readonly<ColorRamp>; /** * Async function corresponding to the "sourceReady" event. * Resolves directly if source is already ready, or awaits the "sourceReady" * event if not. */ onSourceReadyAsync(): Promise<void>; } export { RadarLayer };