Classes
Type Definitions
-
Options{Object}
-
Properties:
Name Type Description classNamestring
(defaults to 'ol-rotate')CSS class name.
labelstring | HTMLElement
(defaults to '⇧')Text label to use for the rotate button. Instead of text, also an element (e.g. a
spanelement) can be used.tipLabelstring
(defaults to 'Reset rotation')Text label to use for the rotate tip.
compassClassNamestring
(defaults to 'ol-compass')CSS class name for the compass.
durationnumber
(defaults to 250)Animation duration in milliseconds.
autoHideboolean
(defaults to true)Hide the control when rotation is 0.
renderfunction | undefined Function called when the control should be re-rendered. This is called in a
requestAnimationFramecallback.resetNorthfunction | undefined Function called when the control is clicked. This will override the default
resetNorth.targetHTMLElement | string | undefined Specify a target if you want the control to be rendered outside of the map's viewport.