Skip to content

Instantly share code, notes, and snippets.

@pratamawijaya
Created February 20, 2015 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pratamawijaya/7d2bacd55c3beee4f671 to your computer and use it in GitHub Desktop.
Save pratamawijaya/7d2bacd55c3beee4f671 to your computer and use it in GitHub Desktop.
private void fetchDirection(List<Steps> stepsList) {
Log.d("debug", "size list awal: " + latLngList.size());
for (Steps data : stepsList) {
// add start
latLngList.add(new LatLng(data.getStartLocation().getLat(), data.getStartLocation().getLng()));
// decode poly
List<LatLng> decodedPoly = Utils.decodePoly(data.getPolyline().getPoints());
for (LatLng point : decodedPoly)
latLngList.add(new LatLng(point.latitude, point.longitude));
latLngList.add(new LatLng(data.getEndLocation().getLat(), data.getEndLocation().getLng()));
// add end
}
Log.d("debug", "size list akhir : " + latLngList.size());
drawDirectionToMap(latLngList);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment