Module: ol/control/Rotate

ol/control/Rotate


Classes

Rotate

Type Definitions

Options{Object}

Properties:
Name Type Description
className string
(defaults to 'ol-rotate')

CSS class name.

label string | HTMLElement
(defaults to '⇧')

Text label to use for the rotate button. Instead of text, also an element (e.g. a span element) can be used.

tipLabel string
(defaults to 'Reset rotation')

Text label to use for the rotate tip.

compassClassName string
(defaults to 'ol-compass')

CSS class name for the compass.

duration number
(defaults to 250)

Animation duration in milliseconds.

autoHide boolean
(defaults to true)

Hide the control when rotation is 0.

render function | undefined

Function called when the control should be re-rendered. This is called in a requestAnimationFrame callback.

resetNorth function | undefined

Function called when the control is clicked. This will override the default resetNorth.

target HTMLElement | string | undefined

Specify a target if you want the control to be rendered outside of the map's viewport.