Maps SDK for Web

tt.TouchZoomRotateHandler

The TouchZoomRotateHandler allows the user to zoom and rotate the map by pinching on a touchscreen. User can zoom with one finger by double tapping and dragging. On the second tap, hold the finger down and drag up or down to zoom in or out.

Methods

disable( )

Disables the 'pinch to rotate and zoom' interaction.

disableRotation( )

Disables the 'pinch to rotate' interaction, leaving the 'pinch to zoom' interaction enabled.

enable([options])

Enables the 'pinch to rotate and zoom' interaction.

Example
map.touchZoomRotate.enable();
map.touchZoomRotate.enable({ around: 'center' });
Parameters
Name Description
options
Object
default:None
Object with options
options.around
String
default:None
If 'center' is passed, map will zoom around center of map

enableRotation( )

Enables the 'pinch to rotate' interaction.

isEnabled( ): Boolean

Returns a Boolean indicating whether the 'pinch to rotate and zoom' interaction is enabled.

Returns

true if the 'pinch to rotate and zoom' interaction is enabled.