[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 635a3f21a0
commit 009da507fa

View File

@@ -648,10 +648,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);