Rjz*_*ara 1 android google-maps path google-polyline
使用折线我可以在两点之间创建一条路径。
但是当我使用这两个点(艾哈迈达巴德到纽约)时,不会创建折线。否则,如果两点之间没有 SEA,则它会起作用。
当积分像时,我遇到了问题
最后我得到了Ola和Uber应用程序如何做这些的答案。
ArrayList<LatLng> points = new ArrayList<LatLng>();
PolylineOptions polyLineOptions = new PolylineOptions();
points.add(new LatLng(from_latitude,from_longitude));
points.add(new LatLng(to_latitude,to_longitude));
polyLineOptions.width(7 * 1);
polyLineOptions.geodesic(true);
polyLineOptions.color(activity.getResources().getColor(R.color.black));
polyLineOptions.addAll(points);
Polyline polyline = mMap.addPolyline(polyLineOptions);
polyline.setGeodesic(true);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3598 次 |
| 最近记录: |