In my application there is a map and the map has many pins. When the user taps on a pin, name of the touched pin appears in a balloon. What I want is to display all balloons on page loads, not when the user touches a pin. I have written the ItemizedOverlayWithBubble class and it overrides a method called onSingleTapUpHelper:
@Override protected boolean onSingleTapUpHelper(final int index, final Item item, final MapView mapView) {
showBubbleOnItem(index, mapView, true);
return true;
}
Inside that there is another method call showBubbleOnItem(index, mapView, true);
public void showBubbleOnItem(final int index, final MapView mapView, boolean panIntoView) {
ExtendedOverlayItem eItem = (ExtendedOverlayItem)(getItem(index));
mItemWithBubble = eItem;
if (eItem != null){
eItem.showBubble(mBubble, mapView, panIntoView);
//setFocus((Item)eItem);
}
}
I played around with it for a while to see if I could get it working on page load but got no luck. Any help is greatly appreciated.