rlayers
Version:
React Components for OpenLayers
30 lines • 958 B
TypeScript
import React from 'react';
import { ScaleLine } from 'ol/control';
import { Options, Units } from 'ol/control/ScaleLine';
import { RContextType } from '../context';
import { default as RControlBase, RControlProps } from './RControlBase';
/**
* @propsfor RScaleLine
*/
export interface RScaleLineProps extends RControlProps {
/** Minimum width */
minWidth?: number;
/** Use bars instead of a line */
bar?: boolean;
/** Label */
text?: boolean;
/** Units for the scale line: 'degrees', 'imperial', 'nautical', 'metric', 'us'
* @default 'metric' */
units?: Units;
}
/**
* Scaleline control
*
* Requires an `RMap` context
*/
export default class RScaleLine extends RControlBase<RScaleLineProps, Record<string, never>> {
ol: ScaleLine;
constructor(props: Readonly<RScaleLineProps>, context?: React.Context<RContextType>);
toOLProps(props: RScaleLineProps): Options;
}
//# sourceMappingURL=RScaleLine.d.ts.map