@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

ParameterType
propsScaleLineControlProps

Returns

null

Interfaces

ScaleLineControlProps

Defined in: packages/openlayers/src/control/scale-line-control.tsx:9

Extends

Properties

PropertyTypeDescriptionInherited from
bar?booleanRender scalebars instead of a line.ControlOptions.bar
className?stringCSS class name. The default is ol-scale-bar when configured with bar: true. Otherwise the default is ol-scale-line.ControlOptions.className
dpi?numberdpi 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?HTMLElementThe element is the control's container element. This only needs to be specified if you're developing a custom control.ControlOptions.element
maxWidth?numberMaximum width in pixels at the OGC default dpi. The width will be adjusted to match the dpi used.ControlOptions.maxWidth
minWidth?numberMinimum 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) => voidFunction called when the control should be re-rendered. This is called in a requestAnimationFrame callback.FullScreenControlProps.render
steps?numberNumber of steps the scalebar should use. Use even numbers for best results. Only applies when bar is true.ControlOptions.steps
target?string | HTMLElementSpecify a target if you want the control to be rendered outside of the map's viewport.ControlOptions.target
text?booleanRender the text scale above of the scalebar. Only applies when bar is true.ControlOptions.text
units?UnitsUnits.ControlOptions.units