0
https://developers.google.com/maps/documentation/android/lines doc说通过制作".geodesic(true)"
选项,它会跟随地球的曲率。但它只是显示了一条直线。有什么建议么?如何在Google Maps v2上的两个标记点之间绘制路线?
https://developers.google.com/maps/documentation/android/lines doc说通过制作".geodesic(true)"
选项,它会跟随地球的曲率。但它只是显示了一条直线。有什么建议么?如何在Google Maps v2上的两个标记点之间绘制路线?
试试这个代码
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);
你
这个代码发送到GoogleMap的方向,这可能是帮助。但我通过使用标记点运行时间来传递经度纬度。在给定的代码中传递的latlngs没有给出路由。我想绘制标记点之间的路径路径。 – Krunal