Skip to content

Commit

Permalink
added onBalloonOpen event
Browse files Browse the repository at this point in the history
  • Loading branch information
jgilfelt committed Feb 2, 2012
1 parent 0ed4c71 commit f1e1167
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ public int getBalloonBottomOffset() {
protected boolean onBalloonTap(int index, Item item) {
return false;
}

/**
* Override this method to perform actions upon an item being tapped before
* its balloon is displayed.
*
* @param index - The index of the item tapped.
*/
protected void onBalloonOpen(int index) {}

/* (non-Javadoc)
* @see com.google.android.maps.ItemizedOverlay#onTap(int)
Expand All @@ -99,6 +107,7 @@ public final boolean onTap(int index) {
currentFocussedIndex = index;
currentFocussedItem = createItem(index);

onBalloonOpen(index);
createAndDisplayBalloonOverlay();

mc.animateTo(currentFocussedItem.getPoint());
Expand Down

0 comments on commit f1e1167

Please sign in to comment.