Module: ol/control/Rotate

ol/control/Rotate


Classes

Rotate

Type Definitions

Options{Object}

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

CSS 类名。

label string | HTMLElement
(defaults to '⇧')

旋转按钮的文本标签。 除了文本,也可以使用元素(例如 span 元素)。

tipLabel string
(defaults to 'Reset rotation')

旋转提示的文本标签。

compassClassName string
(defaults to 'ol-compass')

指南针的 CSS 类名。

duration number
(defaults to 250)

动画持续时间,以毫秒为单位。

autoHide boolean
(defaults to true)

当旋转为 0 时隐藏控件。

render function | undefined

控件需要重新渲染时调用的函数。 此函数在 requestAnimationFrame 回调中调用。

resetNorth function | undefined

点击控件时调用的函数。 这将覆盖默认的 resetNorth

target HTMLElement | string | undefined

如果希望控件在地图视口之外渲染,请指定目标。