iphone喜欢在Android地图上的注释 [英] iphone like annotation on android map

查看:95
本文介绍了iphone喜欢在Android地图上的注释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Android地图中,我有三个覆盖如下:
输入图像描述http: //i44.tinypic.com/27x2oth.png

Inside my android map I have three overlays looking like this: enter image description http://i44.tinypic.com/27x2oth.png

我想要的是当我点击每个叠加层来获得像iphone的标注。与第二张照片中的重叠画面相似的东西与

what I want is when I tap on each overlay to obtain something like an iphone callout. Something similar with what you see on the second picture, on the top of the overlay.

所以:当我点击顶部的叠加层时,我想要得到一些东西像第二张图片...当我点击该标注我想要一个新的活动。任何想法如何
谢谢!

So: When I tap an overlay on the top of it I want to get something like in second picture...and when I click that callout I want to get to a new activity.Any idea how????? Thank you!

输入图片描述http://i42.tinypic.com/33or7ea.png

编辑:

当用户点击我的过份时,我已经做到了这一点,问题是对话框出现在不在顶部的顶部的头部中间。如何获取?

When the user taps my overlys I've done this, the problem is that the dialog box appears on the middle of the screnn not on the top of the overlay tapped.How do I get that?

    @Override
        protected boolean onTap(int i) {

          AlertDialog.Builder dialog = new AlertDialog.Builder(NotificationsActivity.this);
          //dialog.setTitle(items.getTitle());
          dialog.setMessage(items.get(i).getSnippet());
          dialog.show();
          return true; 
        }


推荐答案

这是一个项目 MapViewBallons

下载该项目..
在Eclipse中打开它

download that project.. open it in Eclipse

转到属性和Android部分,确保
是库复选框被选中。

Goto Properties and the Android section and make sure is Library check box is checked.

现在打开您的项目属性从左侧获取android部分

now Open your project properties got android section from left

,并将MapViewBallonsProject添加为库项目。

and add MapViewBallonsProject as a library project.

这篇关于iphone喜欢在Android地图上的注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆