iphone一样的注释上的android地图 [英] iphone like annotation on android map

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

问题描述

在我的Andr​​oid的地图我有三个叠加看起来像这样:

我要的是,当我点击每个图标来获得的东西如iPhone标注。东西与你的第二张照片看,在覆盖的顶部类似。

所以:当我一敲覆盖在它上面我想要得到的东西像第二幅图片......当我点击的标注我希望得到一个新的activity.Any知道如何????? 谢谢!

编辑:

当用户点击我overlys我已经做到了这一点,问题是tapped.How我得到的对话框出现在screnn中间没有覆盖的顶部?

  @覆盖
        受保护的布尔中的onTap(int i)以{

          AlertDialog.Builder对话框=新AlertDialog.Builder(NotificationsActivity.this);
          //dialog.setTitle(items.getTitle());
          dialog.setMessage(items.get(ⅰ).getSnippet());
          dialog.show();
          返回true;
        }
 

解决方案

下面是一个项目 MapViewBallons

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

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

现在打开项目的属性得到了左Android中

和添加MapViewBallonsProject为库项目。

Inside my android map I have three overlays looking like this:

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!

EDIT:

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; 
        }

解决方案

Here is a project MapViewBallons

download that project.. open it in Eclipse

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

now Open your project properties got android section from left

and add MapViewBallonsProject as a library project.

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

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