Browse files

added onBalloonOpen event

  • Loading branch information...
1 parent 0ed4c71 commit f1e116789ac8743aca579ec837ea2e781dc99c2b @jgilfelt committed Feb 2, 2012
View
9 ...id-mapviewballoons/src/com/readystatesoftware/mapviewballoons/BalloonItemizedOverlay.java
@@ -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)
@@ -99,6 +107,7 @@ public final boolean onTap(int index) {
currentFocussedIndex = index;
currentFocussedItem = createItem(index);
+ onBalloonOpen(index);
createAndDisplayBalloonOverlay();
mc.animateTo(currentFocussedItem.getPoint());

0 comments on commit f1e1167

Please sign in to comment.