【发布时间】:2014-01-20 11:30:48
【问题描述】:
我想基于示例添加方法 onInfoWindowClick:
https://developers.google.com/maps/documentation/android/utility/marker-clustering
在课堂上:
方法应该是这样的:
@Override
public void onInfoWindowClick(Person person) {
// Does nothing, but you could go into the user's profile page, for example.
if (person.name.equals("JOHN"))
{
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("google.navigation:q=NEW+YORK")); startActivity(i);
有什么建议吗? }
【问题讨论】:
-
你可以做的是在局部变量中注册变量 Person 并在“onInfoWindowClick”时重用它,因为你必须先点击一个标记才能显示 infoWindow。
-
可以举一些简单的例子吗?
标签: android google-maps-markers