close
之前寫的文章 :

Android Location-based Service APIs

發現google develop 網站上面也有些資料

這篇:
Intents List: Invoking Google Applications on Android Devices
有提到如何使用intent到 google map

顯示地圖

Uri uri = Uri.parse("geo:38.899533,-77.036476");
Intent it = new Intent(Intent.ACTION_VIEW, uri);
startActivity(it);


路徑規劃

Uri uri = Uri.parse("http://maps.google.com/maps? f=d&saddr=startLat%20startLng&daddr=endLat%20endLng&hl=en");
Intent it = new Intent(Intent.ACTION_VIEW, uri);
startActivity(it);

//where startLat, startLng, endLat, endLng are a long with 6 decimals
like: 50.123456

// 把把起點終點以經緯度表示然後丟給google map 去做路徑規劃

感謝ysl大大提供。

相關文章:

奧妙的Intent
arrow
arrow
    全站熱搜

    tttt 發表在 痞客邦 留言(0) 人氣()