Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] - deselect marker on infowindow click
Browse files Browse the repository at this point in the history
  • Loading branch information
tobrun committed Jan 19, 2017
1 parent 7b61324 commit 05f6ee2
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void onClick(View v) {

if (!handledDefaultClick) {
// default behavior: close it when clicking on the tooltip:
close();
closeInfoWindow();
}
}
}
Expand All @@ -93,6 +93,14 @@ public boolean onLongClick(View v) {
});
}

private void closeInfoWindow() {
MapboxMap mapbox = mapboxMap.get();
Marker marker = boundMarker.get();
if (marker != null && mapbox != null) {
mapbox.deselectMarker(marker);
}
close();
}

/**
* Open the info window at the specified position.
Expand Down

0 comments on commit 05f6ee2

Please sign in to comment.