Skip to content

Commit

Permalink
Upgrade Android annotation plugin to v0.9 (#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
m0nac0 authored Sep 8, 2020
1 parent 389d7b2 commit ea199c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ android {
}
dependencies {
implementation "com.mapbox.mapboxsdk:mapbox-android-sdk:9.2.0"
implementation "com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v9:0.8.0"
implementation "com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v9:0.9.0"
implementation "com.mapbox.mapboxsdk:mapbox-android-plugin-localization-v9:0.12.0"
}
compileOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -783,27 +783,31 @@ public void onCameraTrackingDismissed() {
}

@Override
public void onAnnotationClick(Annotation annotation) {
public boolean onAnnotationClick(Annotation annotation) {
if (annotation instanceof Symbol) {
final SymbolController symbolController = symbols.get(String.valueOf(annotation.getId()));
if (symbolController != null) {
symbolController.onTap();
return true;
}
}

if (annotation instanceof Line) {
final LineController lineController = lines.get(String.valueOf(annotation.getId()));
if (lineController != null) {
lineController.onTap();
return true;
}
}

if (annotation instanceof Circle) {
final CircleController circleController = circles.get(String.valueOf(annotation.getId()));
if (circleController != null) {
circleController.onTap();
return true;
}
}
return false;
}

@Override
Expand Down

0 comments on commit ea199c7

Please sign in to comment.