Reputation: 33
Google Maps uses JSON files to describe the directions from point A to point B.
I have stored several such JSONs into a text file. I then acquire some JSON from the file, and want to graph its directions into a Google Maps Android activity.
I expected that there already would be some function about this, but I can't find anything, except parsing the JSON and graphing the directions point by point, which seems impractical.
Any suggestions? Thanks a lot for your time.
Upvotes: 0
Views: 433
Reputation: 32178
I understand you would like to have something similar to DirectionsRenderer of Google Maps JavaScript API, but in Google Maps Android API.
Unfortunately, Google Maps Android API doesn't have such class at the moment. You should parse the JSON and create polylines yourself.
You can see the feature request to add the directions support in the Google Maps Android API:
https://issuetracker.google.com/issues/35822353
Feel free to star the feature request to express your interest.
Upvotes: 1