本机Google地图应用程序已具有您描述的所有功能。
现在任何人都可以使用其内置的地图应用来获取校园建筑之间的步行方向。 (Example - 注意到路线带你穿越校园走道,不沿周边道路。)
要查看室内地图在行动上,使用Android设备上的地图应用来放大宜家或看看this video 。
如果你有一个应用程序,你想推出从地图应用程序,这样做:
Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("http://maps.google.com/maps?saddr=START_LOCATION&daddr=DESTINATION_LOCATION&dirflg=w"));
if (isAppInstalled("com.google.android.apps.maps")) {
intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
}
startActivity(intent);
// helper function to check if Maps is installed
private boolean isAppInstalled(String uri) {
PackageManager pm = getApplicationContext().getPackageManager();
boolean app_installed = false;
try {
pm.getPackageInfo(uri, PackageManager.GET_ACTIVITIES);
app_installed = true;
} catch (PackageManager.NameNotFoundException e) {
app_installed = false;
}
return app_installed;
}
(代码无耻地从here被盗。)