Maps SDK for Web
tt.DragPanHandler
The DragPanHandler allows the user to pan the map by clicking and dragging the cursor.
Methods
disable( )
Disables the 'drag to pan' interaction.
enable([options])
Enables the 'drag to pan' interaction.
Example
map.dragPan.enable();
map.dragpan.enable({
    linearity: 0.3,
    easing: bezier(0, 0, 0.3, 1),
    maxSpeed: 1400,
    deceleration: 2500,
});
Parameters
| Name | Description | 
|---|---|
| options Object default:None | Options object | 
| options.linearity Number default:0 | The factor used to scale the drag velocity | 
| options.easing Function default:bezier(0, 0, 0.3, 1) | The easing function applied to map.panTowhen applying the drag. | 
| options.maxSpeed Number default:1400 | The maximum value of the drag velocity. | 
| options.deceleration Number default:2500 | The rate at which the speed reduces after the pan ends. | 
isActive( ): Boolean
Returns a Boolean indicating whether the 'drag to pan' interaction is active, i.e. currently being used.
Returns
true if the 'drag to pan' interaction is active.
isEnabled( ): Boolean
Returns a Boolean indicating whether the 'drag to pan' interaction is enabled.
Returns
true if the 'drag to pan' interaction is enabled.