Travel Time API?

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

Travel Time API?

Postby jermpatrick » Fri May 14, 2010 6:27 pm

Hi,

Is there a dynamic travel time API? Can I periodically calculate distance to destination?
jermpatrick
Junior Developer
Junior Developer
 
Posts: 11
Joined: Thu May 13, 2010 8:16 pm

Top

Postby mathias.lin » Sat May 15, 2010 6:08 pm

Not with the native android maps api, you need to use the google maps web api, i.e. making a http request and parsing the kml xml data. You get the raw xml data from google maps when you add the parameter &output=kml to any route calculation url in google maps.
User avatar
mathias.lin
Experienced Developer
Experienced Developer
 
Posts: 60
Joined: Tue Aug 11, 2009 4:21 am
Location: Guangzhou, China

Re: Travel Time API?

Postby jermpatrick » Thu May 20, 2010 8:59 pm

Is this the same approach I have to take to get routing/directions?

This seems like a costly solution especially if the application requires constant location updates.

Thanks for the insight!
jermpatrick
Junior Developer
Junior Developer
 
Posts: 11
Joined: Thu May 13, 2010 8:16 pm

Re: Travel Time API?

Postby mathias.lin » Thu May 20, 2010 9:07 pm

Yes, also for route calculation. It's the only way I've found so far; and I've already searched for solutions for quite a while. Definitely expensive, in our case we don't update it frequently, we only calculate the route once, but we don't do real-time turn-by-turn nav (which would not be allowed anyway ref. to the Google Maps ToS).
User avatar
mathias.lin
Experienced Developer
Experienced Developer
 
Posts: 60
Joined: Tue Aug 11, 2009 4:21 am
Location: Guangzhou, China

Re: Travel Time API?

Postby jermpatrick » Thu May 20, 2010 10:07 pm

Thanks for all the help.

Is the entire Google Maps API V3 accessible for the iPhone and Andriod?
jermpatrick
Junior Developer
Junior Developer
 
Posts: 11
Joined: Thu May 13, 2010 8:16 pm

Re: Travel Time API?

Postby mathias.lin » Fri May 21, 2010 2:48 am

I guess the web maps api is always available via http request to your android app, since all you do is pass parameters along the google maps url. But the web maps api is not equivalent to the native android maps api. The native android maps api is much more limited, especially since the navigation package has been dropped (since sdk 0.9).
User avatar
mathias.lin
Experienced Developer
Experienced Developer
 
Posts: 60
Joined: Tue Aug 11, 2009 4:21 am
Location: Guangzhou, China

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 5 guests