Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Commit

Permalink
Bumped annotation plugin to 0.9.0 (#1362)
Browse files Browse the repository at this point in the history
  • Loading branch information
pengdev authored Aug 13, 2020
1 parent 5290fd4 commit 2f7dec1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,22 +70,24 @@ public void onStyleLoaded(@NonNull Style style) {
// Add click listener and change the symbol to a cafe icon on click
symbolManager.addClickListener(new OnSymbolClickListener() {
@Override
public void onAnnotationClick(Symbol symbol) {
public boolean onAnnotationClick(Symbol symbol) {
Toast.makeText(SymbolListenerActivity.this,
getString(R.string.clicked_symbol_toast), Toast.LENGTH_SHORT).show();
symbol.setIconImage(MAKI_ICON_CAFE);
symbolManager.update(symbol);
return true;
}
});

// Add long click listener and change the symbol to an airport icon on long click
symbolManager.addLongClickListener((new OnSymbolLongClickListener() {
@Override
public void onAnnotationLongClick(Symbol symbol) {
public boolean onAnnotationLongClick(Symbol symbol) {
Toast.makeText(SymbolListenerActivity.this,
getString(R.string.long_clicked_symbol_toast), Toast.LENGTH_SHORT).show();
symbol.setIconImage(MAKI_ICON_AIRPORT);
symbolManager.update(symbol);
return true;
}
}));

Expand Down
2 changes: 1 addition & 1 deletion gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ext {
mapboxPluginTraffic : '0.10.0',
mapboxChinaPlugin : '2.4.0',
mapboxPluginMarkerView : '0.4.0',
mapboxPluginAnnotation : '0.8.0',
mapboxPluginAnnotation : '0.9.0',
mapboxPluginScalebar : '0.5.0',

// Support
Expand Down

0 comments on commit 2f7dec1

Please sign in to comment.