UNPKG

rlayers

Version:

React Components for OpenLayers

36 lines 1.42 kB
import React from 'react'; import { Tile as LayerTile } from 'ol/layer'; import { default as SourceWMTS, Options } from 'ol/source/WMTS'; import WMTSCapabilities from 'ol/format/WMTSCapabilities'; import BaseEvent from 'ol/events/Event'; import { RContextType } from '../context'; import { default as RLayerRaster, RLayerRasterProps } from './RLayerRaster'; /** * @propsfor RLayerWMTS */ export interface RLayerWMTSProps extends RLayerRasterProps { /** URL for the WMTS getCapabilites request */ url: string; /** Layer name */ layer: string; /** Called by OpenLayers when the layer is ready to start rendering */ onSourceReady?: (this: RLayerWMTS, e: BaseEvent) => void; /** Called each time the component is rerendered if/after the WMTS capabilities have been acquired */ onCapabilities?: (this: RLayerWMTS, opt: Options) => void; } /** * A layer for WMTS-compatible raster tile servers * * Requires an `RMap` context */ export default class RLayerWMTS extends RLayerRaster<RLayerWMTSProps> { ol: LayerTile<SourceWMTS>; source: SourceWMTS; loading: Promise<SourceWMTS> | null; parser: WMTSCapabilities; options: Options; constructor(props: Readonly<RLayerWMTSProps>, context?: React.Context<RContextType>); protected createSource(): Promise<SourceWMTS>; protected refresh(prevProps?: RLayerWMTSProps): void; } //# sourceMappingURL=RLayerWMTS.d.ts.map