Skip to content

Both copy text to your clipboard — Build with AI copies a setup prompt to paste into Claude Code, Cursor, Codex or Copilot; Copy page as Markdown copies this page to paste into a chat. How it works

DragRotateHandler ​

Defined in: src/ui/handler/shim/drag_rotate.ts:25

The DragRotateHandler allows the user to rotate the map by clicking and dragging the cursor while holding the right mouse button or ctrl key.

Methods ​

disable() ​

disable(): void

Defined in: src/ui/handler/shim/drag_rotate.ts:64

Disables the "drag to rotate" interaction.

Returns ​

void

Example ​

ts
map.dragRotate.disable();

enable() ​

enable(): void

Defined in: src/ui/handler/shim/drag_rotate.ts:50

Enables the "drag to rotate" interaction.

Returns ​

void

Example ​

ts
map.dragRotate.enable();

isActive() ​

isActive(): boolean

Defined in: src/ui/handler/shim/drag_rotate.ts:84

Returns a Boolean indicating whether the "drag to rotate" interaction is active, i.e. currently being used.

Returns ​

boolean

true if the "drag to rotate" interaction is active.


isEnabled() ​

isEnabled(): boolean

Defined in: src/ui/handler/shim/drag_rotate.ts:75

Returns a Boolean indicating whether the "drag to rotate" interaction is enabled.

Returns ​

boolean

true if the "drag to rotate" interaction is enabled.