@maptiler/weather
Version:
Weather layers for MapTiler Cloud and MapTiler SDK
41 lines (40 loc) • 1.43 kB
TypeScript
import { Map as MapSDK } from '@maptiler/sdk';
import { ColorRamp } from '../../core/ColorRamp';
import { TileLayer } from '../TileLayer/TileLayer';
import { TemperatureLayerOptions, TemperaturePickAt } from './types';
/**
* The TemperatureLayer shows the atmospheric temperature in centigrade
*/
export declare class TemperatureLayer extends TileLayer {
private constructorOptions;
private isSourceReady;
private colorRamp;
constructor(options?: TemperatureLayerOptions);
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 temperature in multiple measurement units 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;
}): TemperaturePickAt;
/**
* 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>;
}