<NMAMapGestureDelegate>
Protocol Summary
protocol <NMAMapGestureDelegate>
Derived from: <NSObject>
Delegate protocol for map gesture handling.
Include: NMAKit.framework/headers/NMAMapGesture.h
Inheritance Diagrams

[For complete information, see the section Protocol Details]
Instance Method Summary
Instance Method Summary |
---|
Delegate callback for an NMAMapView double-tap gesture |
Delegate callback for an NMAMapView long press gesture |
Delegate callback for an NMAMapView pan gesture. |
Delegate callback for an NMAMapView pinch gesture. |
Delegate callback for an NMAMapView tap gesture |
Delegate callback for an NMAMapView two finger-tap gesture |
Protocol Details
Delegate protocol for map gesture handling.
This protocol should be implemented by any class which acts as the gesture delegate for a map view or any map subview which needs to receive gestures from the map view.
The NMAMapView may optionally be provided with a gesture delegate, set via the gestureDelegate property. This delegate can be used to receive events about gestures.
Methods of this protocol will be called on the main queue.
Instance Method Details
- @optional (void) mapView:(nonnull NMAMapView *) mapView didReceiveDoubleTapAtLocation:(CGPoint) location
Delegate callback for an NMAMapView double-tap gesture.
Parameters:
-
mapView
The NMAMapView on which the gesture occurred.
-
location
The screen location in points at which the gesture occurred.
- @optional (void) mapView:(nonnull NMAMapView *) mapView didReceiveLongPressAtLocation:(CGPoint) location
Delegate callback for an NMAMapView long press gesture.
Parameters:
-
mapView
The NMAMapView on which the gesture occurred.
-
location
The screen location in points at which the gesture occurred.
- @optional (void) mapView:(nonnull NMAMapView *) mapView didReceivePan:(CGPoint) translation atLocation:(CGPoint) location
Delegate callback for an NMAMapView pan gesture.
The translation of a pan gesture is reported as the distance covered by the gesture since the last callback or since the beginning of the gesture. Note that this differs from the behaviour of UIPanGestureRecognizer, which reports the total translation since the beginning of the gesture.
Parameters:
-
mapView
The NMAMapView on which the gesture occurred.
-
translation
The current translation of the pan gesture, in points.
-
location
The screen location in points at which the gesture occurred.
- @optional (void) mapView:(nonnull NMAMapView *) mapView didReceivePinch:(float) pinch atLocation:(CGPoint) location
Delegate callback for an NMAMapView pinch gesture.
The current pinch change is measured as the relative distance change of the two touch points since the last pinch callback or the beginning of the gesture. For example, if the pinch value is 1.2, the two touches are 20% farther apart than they were at the time of the last update. Note that this differs from the behaviour of UIPinchGestureRecognizer, which reports the total pinch since the beginning of the gesture.
Parameters:
-
mapView
The NMAMapView on which the gesture occurred.
-
pinch
The current relative pinch change of the gesture.
-
location
The screen location in points at which the gesture occurred.
- @optional (void) mapView:(nonnull NMAMapView *) mapView didReceiveTapAtLocation:(CGPoint) location
Delegate callback for an NMAMapView tap gesture.
Parameters:
-
mapView
The NMAMapView on which the gesture occurred.
-
location
The screen location in points at which the gesture occurred.
- @optional (void) mapView:(nonnull NMAMapView *) mapView didReceiveTwoFingerTapAtLocation:(CGPoint) location
Delegate callback for an NMAMapView two finger-tap gesture.
Parameters:
-
mapView
The NMAMapView on which the gesture occurred.
-
location
The screen location in points at which the gesture occurred.