UserInteractionOptions interface

The options for enabling/disabling user interaction with the map.

Extends

Properties

boxZoomInteraction

Whether the Shift + left click and drag will draw a zoom box. default true

dblClickZoomInteraction

Whether double left click will zoom the map inwards. default true

dragPanInteraction

Whether left click and drag will pan the map. default true

dragRotateInteraction

Whether right click and drag will rotate and pitch the map. default true

interactive

Whether the map is interactive or static. If false, all user interaction is disabled. If true, only selected user interactions will enabled. default true

keyboardInteraction

Whether the keyboard interactions are enabled.

Escape: Jump focus to the map.

+/=: Increase zoom level by 1.

Shift + +/=: Increase the zoom level by 2.

-: Decrease zoom level by 1.

Shift + -: Decrease zoom level by 2.

: Pan right 100 pixels.

: Pan left 100 pixels.

: Pan up 100 pixels.

: Pan down 100 pixels.

Shift + : Rotate 15 degrees clockwise.

Shift + : Rotate 15 degrees counter-clockwise.

Shift + : Increase pitch by 10 degrees.

Shift + : Decrease pitch by 10 degrees.

default `true`
scrollZoomInteraction

Whether the map should zoom on scroll input. default true

touchInteraction

Whether touch interactions are enabled for touch devices. default true

touchRotate

Whether touch rotation is enabled for touch devices. This option is not applied if touchInteraction is disabled. default true

wheelZoomRate

Sets the zoom rate of the mouse wheel default 1/450

Property Details

boxZoomInteraction

Whether the Shift + left click and drag will draw a zoom box. default true

boxZoomInteraction?: boolean

Property Value

boolean

dblClickZoomInteraction

Whether double left click will zoom the map inwards. default true

dblClickZoomInteraction?: boolean

Property Value

boolean

dragPanInteraction

Whether left click and drag will pan the map. default true

dragPanInteraction?: boolean

Property Value

boolean

dragRotateInteraction

Whether right click and drag will rotate and pitch the map. default true

dragRotateInteraction?: boolean

Property Value

boolean

interactive

Whether the map is interactive or static. If false, all user interaction is disabled. If true, only selected user interactions will enabled. default true

interactive?: boolean

Property Value

boolean

keyboardInteraction

Whether the keyboard interactions are enabled.

Escape: Jump focus to the map.

+/=: Increase zoom level by 1.

Shift + +/=: Increase the zoom level by 2.

-: Decrease zoom level by 1.

Shift + -: Decrease zoom level by 2.

: Pan right 100 pixels.

: Pan left 100 pixels.

: Pan up 100 pixels.

: Pan down 100 pixels.

Shift + : Rotate 15 degrees clockwise.

Shift + : Rotate 15 degrees counter-clockwise.

Shift + : Increase pitch by 10 degrees.

Shift + : Decrease pitch by 10 degrees.

default `true`
keyboardInteraction?: boolean

Property Value

boolean

scrollZoomInteraction

Whether the map should zoom on scroll input. default true

scrollZoomInteraction?: boolean

Property Value

boolean

touchInteraction

Whether touch interactions are enabled for touch devices. default true

touchInteraction?: boolean

Property Value

boolean

touchRotate

Whether touch rotation is enabled for touch devices. This option is not applied if touchInteraction is disabled. default true

touchRotate?: boolean

Property Value

boolean

wheelZoomRate

Sets the zoom rate of the mouse wheel default 1/450

wheelZoomRate?: number

Property Value

number