Reputation: 224
I am trying to implemenet routes
into my Android
app. The way it should work, it's that a person behind a web page sets a route, and the user receives it on his phone. I thought that I could use a DB, to store the routes and then fetch them on my app. I found that I could use Google Maps URL
to create a URL
that has the origin, the destination and every waypoint I want. Web-wise, I managed to do all the coding behind so the operator can create the desired URL
with the route
, and I was thinking about storing the URL
into a database. My question is, if I fetch the URL
from the server on my app, is there any way to draw the polylines
according to it? Or to show it in any other way? Thanks
Upvotes: 0
Views: 131
Reputation: 157
if your link on this format
http://maps.googleapis.com/maps/api/staticmap?size=400x400&path=40.737102,-73.990318|40.749825,-73.987963|40.752946,-73.987384|40.755823,-73.986397&sensor=false
you can get the points to draw the polyline.
Upvotes: 1
Reputation: 324
Yes you can draw fetched routes on your map.
There is a tutorial here: https://developers.google.com/maps/documentation/android-sdk/polygon-tutorial
If you want to use third party library for it. You should check github.
Upvotes: 1