Answer the question
In order to leave comments, you need to log in
How to draw the passed route in google maps api (android)?
Hello, I have a question: how to build a route traveled from a set of coordinates (latitude and longitude)? Please let me know which one can be used.
PS I tried "Google-Directions-Android" lib and didn't find a way to draw the route there. (mb I'm just missing something)
Answer the question
In order to leave comments, you need to log in
PolylineOptions rectOptions = new PolylineOptions()
.add(new LatLng(37.35, -122.0)) // add points
.add(new LatLng(37.45, -122.0))
.add(new LatLng(37.45, -122.2))
.add( new LatLng(37.35, -122.2))
.add(new LatLng(37.35, -122.0));
Polyline polyline = myMap.addPolyline(rectOptions);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question