UNPKG

rlayers

Version:

React Components for OpenLayers

35 lines 1.13 kB
import React from 'react'; import { Control } from 'ol/control'; import { RContextType } from '../context'; import RControlBase, { RControlOptions, RControlProps } from './RControlBase'; /** * @propsfor RLayer */ export interface RLayersProps extends RControlProps { /** Custom element for rendering */ element?: React.ReactElement; } export interface RLayersState { collapsed: boolean; visible: boolean[]; } /** A custom control allowing to switch between different layers * * Layers that are to be controlled have to be nested inside the control * * Every layer should have a `label` property * * Requires an `RMap` context */ export default class RLayers extends RControlBase<RLayersProps, RLayersState> { ol: Control; targetRef: React.RefObject<HTMLDivElement>; constructor(props: Readonly<RLayersProps>, context?: React.Context<RContextType>); onchange: () => void; componentDidMount(): void; componentWillUnmount(): void; toOLProps(props: RLayersProps): RControlOptions; clickCollapse: () => void; render(): JSX.Element; } //# sourceMappingURL=RLayers.d.ts.map