Gesture Interaction
[Navinfo Navigation SDK for Android] provides a rich set of gestures to help developers interact with maps. Gesture operations mainly include zoom gestures, swipe gestures, and rotation gestures.
Slide gesture
Use your finger to hold the map and drag the map to pan or swipe the map.
Zoom gesture
You can pinch or stretch with two fingers and double-click on the map to change the zoom level of the map.
Rotate gesture
You can rotate on the map with two fingers and you can rotate the 3D vector map.
Handshake switch
The switch and query of the gesture can be implemented by code, examples are as follows:
mMapRenderer.enableOptionalGesture(int gesture, boolean enable); // Open the close gesture mMapRenderer.isOptionalGestureEnabled(int gesture); // Query gesture is open
gesture: Gesture type, see MapRenderer.OptionalGesture class, see the following table
enable: gesture switch, true means open gesture, false close gesture
Parameter Name |
Explanation |
---|---|
MapRenderer.OptionalGesture.singleTouchZoom |
Single Finger Zoom |
MapRenderer.OptionalGesture.doubleTouchesElevate |
Double-finger change elevation gesture |
MapRenderer.OptionalGesture.doubleTouchesRotate |
Two-finger rotation gesture |