drawing driving routes using waypoints on android ( Google maps, Google direction api, json parsing, decode google polyline)

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 03:57:34

I have tested your decodePoly part. seems no problem there. you can use steps and legs to be more precise.

@Zeratul thanks for decoding code over overview_polyline.points. That works great. By the way, after getting list of LatLng, you don't need to loop over list. Just use addAll method of PolylineOptions.

List<LatLng> list = decodePoly(encodedString);
PolylineOptions po = new PolylineOptions();
po.addAll(list);
po.width(2).color(Color.BLUE);
Polyline line = getMap().addPolyline(po);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!