How To Get Polyline From Google Maps Directions Api
I'm trying to draw a polyline using the Google Maps Directions Api, but how do I use the JSON values to make this, because in the api, there is a lot of lat and long and polylines.
Solution 1:
Convert overview_polyline into list of LatLng and add as polyling in map
Use PolyUtil provided from google.
Solution 2:
Check Google Maps Android API Utility Library has some predefined method for parsing polyline and many more.
Solution 3:
I have put my answer to some post which contains your answer as well. You can find Parser class and Aysc class as well to draw polyline from response on the map.
Here is the link for post How to buffer a polyline in Android or draw a polygon around a polyline?
Post a Comment for "How To Get Polyline From Google Maps Directions Api"