【发布时间】:2013-01-07 20:04:21
【问题描述】:
我正在尝试获取两个位置之间的行驶方向:
LatLng(12.917745600000000000,77.623788300000000000)
LatLng(12.842056800000000000,7.663096499999940000)
我尝试过的代码:
Polyline line = mMap.addPolyline(new PolylineOptions().
add(new LatLng(12.917745600000000000,77.623788300000000000),
new LatLng(12.842056800000000000,7.663096499999940000))
.width(5).color(Color.RED));
但这会在两点之间画一条直线。
有没有其他方法/方式来获取这两点之间的行车路线。
【问题讨论】:
-
旁注:您可能会丢失坐标末尾的一些数字。考虑到大陆漂移在每秒 1/100000 毫米的范围内,您已将位置指定到 1/10000000000 毫米,这使得坐标错误非常快......
标签: java android google-maps google-maps-android-api-2 directions