开发者

want to show the balloon

I am working on the map view and i want to show the balloon by clicking on the user which are displayed on the map view. i have done till it shows the开发者_如何学编程 use name and status using the dialog box.but i want the profile name, status, and button on small rectangle above the clicked balloon(balloon is the users on the map).please give me some idea to do so. thank you.

protected boolean onTap(int index) {
        OverlayItem item = mOverlays.get(index);
        AlertDialog.Builder dialog = new AlertDialog.Builder(mContext);
        dialog.setTitle(item.getTitle());
        dialog.setMessage(item.getSnippet());
        dialog.show();
        return true;
}


You have to implement your own overlays. Here is the standard way with an icon: http://developer.android.com/resources/tutorials/views/hello-mapview.html

And here is an example for a custom overlay: http://labs.emich.be/2009/12/06/how-to-make-a-custom-overlay-in-android/


Why don't you use android-mapviewballoons?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜