I have a MapView with Overlays like this:
public class MyMapActivity extends MapActivity
{
private MapItemizedOverlay itemizedOverlay;
@Override
public void onCreate(Bundle savedInstanceState)
{
for(a loop to put all 10 datas into overlay)
{
OverlayItem overlayitem=new OverlayItem(some params);
overlayitem.setMarker(some bitmap);
itemizedOverlay.addOverlay(overlayitem);
}
mapView.getOverlays().add(itemizedOverlay);
}
}
public class MapItemizedOverlay extends ItemizedOverlay<OverlayItem>
{
//some code
@Override
protected boolean onTap(int index)
{
//Here I know what marker been clicked...
}
}
I know i get what marker has been clicked in the MapItemizedOverlay class. But how do i use this in my MapView? What i want i show a balloon tip when an OverlayItem is clicked like here Show popup above map marker in MapView.
Please guide me, I dont know what to do at all...
Thanks a lot.
Got it. Used this excellent project. works like a charm:
https://github.com/jgilfelt/android-mapviewballoons
Just Check out both the Project and the example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With