Module: ol/control/Rotate

ol/control/Rotate


Classes

Rotate

Methods

module:ol/control/Rotate.render(mapEvent)

control/Rotate.js, line 156

Update the rotate control element.

This:
Name Type Description
mapEvent module:ol/MapEvent~MapEvent

Map event.

Type Definitions

Options{Object}

Properties:
Name Type Argument Default Description
className string <optional>
'ol-rotate'

CSS class name.

label string | HTMLElement <optional>
'⇧'

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

tipLabel string <optional>
'Reset rotation'

Text label to use for the rotate tip.

duration number <optional>
250

Animation duration in milliseconds.

autoHide boolean <optional>
true

Hide the control when rotation is 0.

render function <optional>

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

resetNorth function <optional>

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

target HTMLElement | string <optional>

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