summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobrun <tobrun.van.nuland@gmail.com>2018-10-09 13:05:23 +0200
committerTobrun <tobrun@mapbox.com>2018-10-09 14:36:50 +0200
commit1e71075b3f0084d581a0b3c2d45e5fabb9ad2ec1 (patch)
treebcb2455e481f348fd5020ad70ea9ad8133ee6c21
parent7bf29bbf5a6542be8c63e25ce5cacad405263766 (diff)
downloadqtlocation-mapboxgl-1e71075b3f0084d581a0b3c2d45e5fabb9ad2ec1.tar.gz
[android] - reverse order of prioritising shape vs marker click handling
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/AnnotationManager.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/AnnotationManager.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/AnnotationManager.java
index 1abf4e6b47..95795f6bb9 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/AnnotationManager.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/AnnotationManager.java
@@ -379,17 +379,17 @@ class AnnotationManager {
//
boolean onTap(PointF tapPoint) {
- ShapeAnnotationHit shapeAnnotationHit = getShapeAnnotationHitFromTap(tapPoint);
- Annotation annotation = new ShapeAnnotationHitResolver(shapeAnnotations).execute(shapeAnnotationHit);
- if (annotation != null) {
- if (handleClickForShapeAnnotation(annotation)) {
+ MarkerHit markerHit = getMarkerHitFromTouchArea(tapPoint);
+ long markerId = new MarkerHitResolver(mapboxMap).execute(markerHit);
+ if (markerId != NO_ANNOTATION_ID) {
+ if (isClickHandledForMarker(markerId)) {
return true;
}
}
- MarkerHit markerHit = getMarkerHitFromTouchArea(tapPoint);
- long markerId = new MarkerHitResolver(mapboxMap).execute(markerHit);
- return markerId != NO_ANNOTATION_ID && isClickHandledForMarker(markerId);
+ ShapeAnnotationHit shapeAnnotationHit = getShapeAnnotationHitFromTap(tapPoint);
+ Annotation annotation = new ShapeAnnotationHitResolver(shapeAnnotations).execute(shapeAnnotationHit);
+ return annotation != null && handleClickForShapeAnnotation(annotation);
}
private ShapeAnnotationHit getShapeAnnotationHitFromTap(PointF tapPoint) {