android跳转到地图app
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                android跳转到地图app
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.                        
                                0.首先判斷是不是有地圖app
1.直接把經(jīng)緯度和地址名稱傳過去
//geo:latitude,longitude //geo:latitude,longitude?z=zoom,z表示zoom級別,值為數(shù)字1到23 //geo:0,0?q=my+street+address //geo:0,0?q=business+near+cityUri mUri = Uri.parse("geo:39.940409,116.355257?q=商家名稱"); Intent mIntent = new Intent(Intent.ACTION_VIEW, mUri); startActivity(mIntent);
跳到地圖app要直接進入導航功能
1.高德
Intent intent = new Intent(); intent.setData(Uri.parse("androidamap://route?sourceApplication=softname" + "&slat=36.2&slon=116.1&sname=abc&dlat=36.3" + "&dlon=116.2&dname=def&dev=0&m=0&t=1&showType=1")); startActivity(intent); 2.百度 Intent intent = new Intent(); intent.setData(Uri.parse("baidumap://map/direction?origin=中關村&" + "destination=五道口&mode=driving®ion=北京")); startActivity(intent);總結(jié)
以上是生活随笔為你收集整理的android跳转到地图app的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: 福音!微信个人公众号可以改名了!
- 下一篇: react学习(59)--this.pr
