UserInteractionOptions interface
The options for enabling/disabling user interaction with the map.
- Extends
Properties
box |
Whether the Shift + left click and drag will draw a zoom box.
default |
dbl |
Whether double left click will zoom the map inwards.
default |
drag |
Whether left click and drag will pan the map.
default |
drag |
Whether right click and drag will rotate and pitch the map.
default |
interactive | Whether the map is interactive or static. If false, all user interaction is disabled. If true, only selected
user interactions will enabled.
default |
keyboard |
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` |
scroll |
Whether the map should zoom on scroll input.
default |
touch |
Whether touch interactions are enabled for touch devices.
default |
touch |
Whether touch rotation is enabled for touch devices. This option is not applied if touchInteraction is disabled.
default |
wheel |
Sets the zoom rate of the mouse wheel
default |
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