如何在Google Maps v2上的两个标记点之间绘制路线?

时间:2013-01-02 12:02:53

标签: android google-maps google-maps-markers

https://developers.google.com/maps/documentation/android/lines doc通过制作".geodesic(true)"选项说,它将遵循地球的曲率。但它只是显示了一条直线。有什么建议?

1 个答案:

答案 0 :(得分:0)

试试这段代码

   String uri = "http://maps.google.com/maps?saddr=" +
   currentLatitude+","+currentLongitude+"&daddr="+fixedLatitude+","+fixedLongitude;
   Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
    Uri.parse(uri)); intent.setClassName("com.google.android.apps.maps",
    "com.google.android.maps.MapsActivity"); startActivity(intent);

这可能会对你有所帮助

相关问题