@react-gis/openlayerscontrol
scale-line-control
Functions
ScaleLineControl()
function ScaleLineControl(props: ScaleLineControlProps): null;Defined in: packages/openlayers/src/control/scale-line-control.tsx:11
Parameters
| Parameter | Type |
|---|---|
props | ScaleLineControlProps |
Returns
null
Interfaces
ScaleLineControlProps
Defined in: packages/openlayers/src/control/scale-line-control.tsx:9
Extends
ControlOptions<OlScaleLineOptions>
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
bar? | boolean | Render scalebars instead of a line. | ControlOptions.bar |
className? | string | CSS class name. The default is ol-scale-bar when configured with bar: true. Otherwise the default is ol-scale-line. | ControlOptions.className |
dpi? | number | dpi of output device such as printer. Only applies when bar is true. If undefined the OGC default screen pixel size of 0.28mm will be assumed. | ControlOptions.dpi |
element? | HTMLElement | The element is the control's container element. This only needs to be specified if you're developing a custom control. | ControlOptions.element |
maxWidth? | number | Maximum width in pixels at the OGC default dpi. The width will be adjusted to match the dpi used. | ControlOptions.maxWidth |
minWidth? | number | Minimum width in pixels at the OGC default dpi. The width will be adjusted to match the dpi used. | ControlOptions.minWidth |
render? | (arg0: MapEvent) => void & (arg0: MapEvent) => void | Function called when the control should be re-rendered. This is called in a requestAnimationFrame callback. | FullScreenControlProps.render |
steps? | number | Number of steps the scalebar should use. Use even numbers for best results. Only applies when bar is true. | ControlOptions.steps |
target? | string | HTMLElement | Specify a target if you want the control to be rendered outside of the map's viewport. | ControlOptions.target |
text? | boolean | Render the text scale above of the scalebar. Only applies when bar is true. | ControlOptions.text |
units? | Units | Units. | ControlOptions.units |