您的位置:首页 > 移动开发 > Android开发

Android 调用系统地图(Google Map)并显示具体方位

2012-04-10 21:10 411 查看
“大众点评” Android App 的商家定位是使用的Google Map,当点击一个商家的地址时,系统会自动调用Google Map,并将商家方位显示出来,这是怎么做到的呢?

Intent intent = new Intent(android.content.Intent.ACTION_VIEW,

Uri.parse("http://ditu.google.cn/maps?hl=zh&mrt=loc&q=31.1198723,121.1099877(上海青浦大街100号)");

intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK

& Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);

intent.setClassName("com.google.android.apps.maps",

"com.google.android.maps.MapsActivity");

startActivity(intent);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: