Classes
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.
compassClassName
string <optional>
'ol-compass' CSS class name for the compass.
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.