2012-02-02 49 views

回答

1

您應該覆蓋您的ItemizedOverlay類的onTap()方法。

@Override 
    protected boolean onTap(int index) { 
     // TODO Auto-generated method stub 
     final OverlayItem items = mapOverlay.get(index); //items is your ArrayList<OverlayItem> for populating of ItemizedOverlay 

     //insert your code for action there 
     AlertDialog.Builder dialog = new AlertDialog.Builder(mContext); 
     dialog.setTitle(item.getTitle()); 
     dialog.setMessage(item.getSnippet()); 
     dialog.show(); 

     return true; 
    } 

我希望這會有所幫助。