import { MMapComplexEntity } from "../MMapEnities"; /** * Types of measurement units that scale control can display. */ export type UnitType = "imperial" | "metric" | "nautical"; /** * Properties for [[MMapScaleControl]] */ type MMapScaleControlProps = { /** Maximum width of scale line in pixels */ maxWidth?: number; /** Units of measurement for the scale line */ unit?: UnitType; }; declare const defaultProps: Readonly<{ maxWidth: 74; unit: "metric"; }>; type DefaultProps = typeof defaultProps; /** * A control that shows the map scale in different units of measurement. * @example Add scale control to the lower left part of the map: * ```js * const scaleControl = new MMapScaleControl({}); * const controls = new MMapControls({position: 'bottom left'}, [scaleControl]); * map.addChild(controls) * ``` * Alternatively, you can show the integrated scale control on the map by `showScaleInCopyrights` props: * ```js * const map = new MMap(document.getElementById('map-root'), { * showScaleInCopyrights: true, * location: {center: [37.622504, 55.753215], zoom: 10} * }); * ``` */ declare class MMapScaleControl extends MMapComplexEntity { static defaultProps: Readonly<{ maxWidth: 74; unit: "metric"; }>; private _unwatchThemeContext?; private _detachDom?; private _element?; private _labelElement?; private _listener?; constructor(props: MMapScaleControlProps); protected _onAttach(): void; protected _onDetach(): void; private _createDom; private _updateDom; private _updateTheme; private _onMapUpdate; private _updateDistance; private _formatDistance; } export { MMapScaleControl, MMapScaleControlProps };