import type { ListenerMethod, WxEventType } from "@metoceanapi/wxtiles-common/types"; import { WxLayer as InnerWxLayer } from "@metoceanapi/wxtiles-common/wxlayer/wxlayer"; import type { WxLayerOptions } from "@metoceanapi/wxtiles-common/types"; import type { BaseDatasetManager } from "@metoceanapi/wxtiles-common/managers/BaseDatasetManager"; /** * Framework dependent source type to be inherited by the framework dependent custom source type. * Mapbox does not provide a parent type for the custom source. * Leaflet provides a parent type for the custom layer to inherit from L.GridLayer. * Used as universal type for the custom source parent class. see {@link WxTileSource} */ export declare class FrameworkParentClass { /** MAPBOX API required */ readonly id: string; /** MAPBOX API required */ readonly type: "custom"; /** MAPBOX API required */ readonly dataType: "raster"; /** MAPBOX API required. only 256 */ readonly tileSize: number; /** MAPBOX API */ readonly maxzoom?: number; /** MAPBOX API */ readonly bounds?: [number, number, number, number]; /** MAPBOX API */ readonly attribution?: string; readonly opacity?: number; /** * @ignore * An instance of the layer * */ readonly _layer: InnerWxLayer; /** * @ignore * evented listeners * */ protected _listeners: { [eventName: string]: ListenerMethod[] | undefined; }; /** * @param {FrameworkOptions} frwOptions - Framework's basic options to construct the layer. */ constructor(frwOptions: FrameworkOptions, wxLayerOptions: WxLayerOptions); /** * add a listener for the event * @param {string} type - event name * @param {ListenerMethod} listener - listener function * @returns {this} * */ on(type: T, listener: ListenerMethod): void; /** * Removes a listener for the event. * @param {string} type - The event name. * @param {ListenerMethod} listener - The listener function to remove. * @returns {void} */ off(type: T, listener: ListenerMethod): void; /** * Adds a listener for the event that will be executed only once. * After the event is fired, the listener will be removed. * @param {string} type - The event name. * @param {ListenerMethod} listener - The listener function to add. * @returns {void} */ once(type: T, listener: ListenerMethod): void; /** * Fires an event of the specified type with the given data. * Calls all listeners for the type asynchronously. * @param {string} type - The event type. * @param {any} data - The data to pass to the listeners. * @returns {void} */ fire(type: T, data: WxEventType[T]): void; } /** * Framework's basic options to construct the layer. * @example * ```ts * const options = { * id: 'wxlayer', * bounds: [ -180, -90, 180, 90 ], * attribution: 'WxTiles', * }; * ``` */ export interface FrameworkOptions { id: string; maxzoom?: number; bounds?: [number, number, number, number]; attribution?: string; opacity?: number; } //# sourceMappingURL=wxsourcetypes.d.ts.map