Location:

Gesture Interaction

[Navinfo Navigation SDK for iOS] provides a rich set of gestures to meet the developer's need for title map interaction. Follow the MBMapViewDelegate protocol to get the start and end timing of each gesture to achieve the desired operation.


Zoom Gesture

You can pinch or stretch with two fingers to change the zoom level of the map.


Swipe Gesture

You can use your finger to drag the map around to scroll (pan) or swipe your finger with the map (animation effect).

The methods you need to implement to get a swipe gesture are as follows:

                /**
                * Drag start callback
                *
                * @param mapView current map instance
                * @param pos first time
                *
                *  @since 5.0.x
                */
                - (void)mbMapView:(MBMapView *)mapView didPanStartPos:(MBPoint)pos;
                /**
                * Drag end callback
                *
                * @param mapView current map instance
                * @param pos Last time
                *
                *  @since 5.0.x
                */
                - (void)mbMapView:(MBMapView *)mapView didPanEndPos:(MBPoint)pos;
            

Rotate Gesture

You can rotate on the map with two fingers and you can rotate the 3D vector map.

The method you need to achieve to get a rotation gesture is as follows:

                /**
                * Triggered when using a gesture to rotate the map
                * @param mapView Current map
                *  
                */
                - (void)mbMapViewOnRotate:(MBMapView *)mapView;
            
TOP