android - 第三方App调用高德地图,总是直接进入到导航页面,有没有办法进入首页?
阿神
阿神 2017-04-18 09:07:56
0
2
1385

我在尝试做类似于美团的调取第三方地图(高德百度)过程中,可以通过

if (JumpMapUtil.isAvilible(mContext, "com.baidu.BaiduMap")) {//传入指定应用包名
            intent.setData(Uri.parse("baidumap://map/geocoder?src=openApiDemo&address=" + mServiceAddress));
            mContext.startActivity(intent); //启动调用
   } 

调取百度地图并且进入百度地图首页并把数据带上。在调用高德地图的过程中,按照网上的解法
要不就是调取了一个浏览器打开网页版高德,要不就是

intent = new Intent("android.intent.action.VIEW",  
android.net.Uri.parse("androidamap://route?sourceApplication=softname&slat=30.6739968716&slon=103.9602246880&sname=当前位置&dlat=30.6798861599&dlon=103.9739656448&dname=目的地&dev=0&m=0&t=1&showType=1"));  
intent.setPackage("com.autonavi.minimap");  

直接进入了选择导航的界面。有什么方法可以进入高德的首页吗?(美团是做到了,可是我不知道怎么做的)

阿神
阿神

闭关修行中......

reply all(2)
Peter_Zhu

According to Amap’s documentation, your call is indeed into Navigation Yeah;
Is this the function you want Keyword navigation

迷茫

What does it mean to enter the homepage of Amap? You can take a look at the documentation. The documentation is very detailed (http://lbs.amap.com/api/amap-mobile/guide/android/map), and the interface to jump to and what parameters to pass are very specific. I guess you want to go directly to the main Amap interface

Intent intent = new Intent("android.intent.action.VIEW",
android.net.Uri.parse("androidamap://showTraffic?sourceApplication=softname&poiid=BGVIS1&lat=36.2&lon=116.1&level=10&dev=0"));
intent.setPackage(“com.autonavi.minimap”);
startActivity(intent);
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template