[android] - don't query for shape annotations if none were added

This commit is contained in:
Tobrun Van Nuland
2017-07-25 12:50:36 +02:00
committed by Tobrun
parent 0e0536a8d7
commit a28228013c

View File

@@ -390,10 +390,12 @@ class AnnotationManager {
//
boolean onTap(PointF tapPoint) {
ShapeAnnotationHit shapeAnnotationHit = getShapeAnnotationHitFromTap(tapPoint);
long shapeAnnotationId = new ShapeAnnotationHitResolver(mapboxMap).execute(shapeAnnotationHit);
if (shapeAnnotationId != NO_ANNOTATION_ID) {
handleClickForShapeAnnotation(shapeAnnotationId);
if (!shapeAnnotationIds.isEmpty()) {
ShapeAnnotationHit shapeAnnotationHit = getShapeAnnotationHitFromTap(tapPoint);
long shapeAnnotationId = new ShapeAnnotationHitResolver(mapboxMap).execute(shapeAnnotationHit);
if (shapeAnnotationId != NO_ANNOTATION_ID) {
handleClickForShapeAnnotation(shapeAnnotationId);
}
}
MarkerHit markerHit = getMarkerHitFromTouchArea(tapPoint);