public static interface MapGesture.OnGestureListener
MapGesture.OnGestureListener
if all
events are necessary and MapGesture.OnGestureListener.OnGestureListenerAdapter
if some events are required. This
interface can be added via MapGesture.addOnGestureListener(OnGestureListener)
and
removed via MapGesture.removeOnGestureListener(OnGestureListener)
.
Please see MapGesture
for a full set of configurable APIs.Modifier and Type | Interface and Description |
---|---|
static class |
MapGesture.OnGestureListener.OnGestureListenerAdapter
Default implementation for the OnGestureListener interface.
|
Modifier and Type | Method and Description |
---|---|
boolean |
onDoubleTapEvent(android.graphics.PointF p)
A callback indicating that a user has performed a double tap gesture on a map.
|
boolean |
onLongPressEvent(android.graphics.PointF p)
A callback indicating that a user has performed a long-press gesture on a map.
|
void |
onLongPressRelease()
A callback indicating that a user has released a long-press gesture on a map.
|
boolean |
onMapObjectsSelected(java.util.List<ViewObject> objects)
A callback indicating that at least one
ViewObject has been selected as a result
of a user tapping on the map. |
void |
onMultiFingerManipulationEnd()
A callback indicating the user has removed all or all-except-one fingers from the screen.
|
void |
onMultiFingerManipulationStart()
A callback indicating the user has put more than one finger onto the screen.
|
void |
onPanEnd()
A callback indicating the user has lifted up their finger and stopped panning.
|
void |
onPanStart()
A callback indicating the user has put one finger on the screen and moved their finger to
trigger panning.
|
void |
onPinchLocked()
A callback indicating that a user has pinched enough to be recognized as the two-finger
zoom gesture.
|
boolean |
onPinchZoomEvent(float scaleFactor,
android.graphics.PointF p)
A callback indicating that a user has performed a pinch-to-zoom gesture on a map.
|
boolean |
onRotateEvent(float rotateAngle)
A callback indicating that a user has performed a rotate gesture on a map.
|
void |
onRotateLocked()
A callback indicating that a user has rotated enough to be recognized as the two-finger
rotation gesture.
|
boolean |
onTapEvent(android.graphics.PointF p)
A callback indicating that a user has performed a single-tap gesture on a map.
|
boolean |
onTiltEvent(float angle)
A callback indicating that a user has performed a two-finger-tilt gesture on a map.
|
boolean |
onTwoFingerTapEvent(android.graphics.PointF p)
A callback indicating that a user has performed a two-finger tap gesture on a map.
|
void onPanStart()
void onPanEnd()
void onMultiFingerManipulationStart()
void onMultiFingerManipulationEnd()
boolean onMapObjectsSelected(java.util.List<ViewObject> objects)
ViewObject
has been selected as a result
of a user tapping on the map.
If the user tapping on the map results in ViewObject
selection (there are
selectable objects located at the tap point), this callback will be made after
onTapEvent(PointF)
, if and only if, false
is returned for that callback.
objects
- A list of selected ViewObject
objectstrue
if consumed, false otherwiseMap.getSelectedObjects(PointF)
boolean onTapEvent(android.graphics.PointF p)
If true
is returned from this callback, no onMapObjectsSelected(List)
callback will be made to any gesture subscribers even if any objects are found at the
screen point.
p
- A PointF
representing the on-screen point of the single-tap gesturetrue
if consumed (which prevents the default pan-to-here behavior),
false
otherwise.Map.getSelectedObjects(PointF)
boolean onDoubleTapEvent(android.graphics.PointF p)
p
- A PointF
representing the on-screen point of the double-tap gesturevoid onPinchLocked()
MapGesture
is set to exclusive
mode from MapGesture.setPinchEnabled(boolean)
.MapGesture.setPinchEnabled(boolean)
boolean onPinchZoomEvent(float scaleFactor, android.graphics.PointF p)
scaleFactor
- A scale factor relative to the points of the two simultaneous touches at
separate screen coordinatesp
- A PointF
representing the on-screen point of the pinch gesturevoid onRotateLocked()
MapGesture
is set to exclusive
mode from MapGesture.setRotateEnabled(boolean)
MapGesture.setRotateEnabled(boolean)
boolean onRotateEvent(float rotateAngle)
rotateAngle
- An angle, in degrees, of the user interaction gesture since its last changeboolean onTiltEvent(float angle)
angle
- An angle, in degrees, to which the map tilt is to change.boolean onLongPressEvent(android.graphics.PointF p)
If a MapMarker
with dragging enabled is located at the same location, returning
true
for this method will nullify that setting.
p
- A PointF
representing the on-screen point where a user has
long-pressedMapMarker.setDraggable(boolean)
void onLongPressRelease()
This callback may also occur when the user has panned around the map.
boolean onTwoFingerTapEvent(android.graphics.PointF p)
p
- A PointF
representing the on-screen point where the two-finger tap
occurred