//移动APP调起Android百度地图方式举例 Intent intent = null; try { // intent = Intent.getIntent("intent://map/direction?origin=latlng:34.264642646862,108.95108518068|name:我家&destination=大雁塔&mode=driving®ion=西安&src=yourCompanyName|yourAppName#Intent;scheme=bdapp;package=com.baidu.BaiduMap;end"); intent = Intent.getIntent("intent://map/direction?" + "origin=大柏树&" + "destination=江湾镇" + "&mode=driving&" + "region=上海市" + "&src=yourCompanyName|yourAppName#Intent;scheme=bdapp;package=com.baidu.BaiduMap;end"); } catch (URISyntaxException e) { Log.e("intent", e.getMessage()); } startActivity(intent); //启动调用
上面的是导航相关代码。参数没有加注释,下面将给出百度官方的API文档连接,上面讲的很详细。