Juan
Juan

Reputation: 429

Full implementation of Google Maps Directions Service on My Android App

I have searched for hours on the web for an example of implementing the direccions service on my android app.

I am using the google maps android api 2.

Basically I want the directions from the actual position and a marker position selected by the user.

I want to make clear that I don´t want to launch a web browser or the google maps aplication, I want to implement the service on my own app.

Till now I found some examples about drawing the route on tha map, which are ok

http://wptrafficanalyzer.in/blog/gps-and-google-map-in-android-applications-series/

Get driving directions using Google Maps API v2

so I just miss the indications part of the service so y can show on my own listview with arrows (turn to left , to right , etc).

Thanks for reading my question

Upvotes: 3

Views: 16979

Answers (1)

Renny Tanuwijaya
Renny Tanuwijaya

Reputation: 86

I'm not sure what you want. In your second link about Google Map API v2, the data for drawing maps comes from maps.googleapis.com .You can see https://developers.google.com/maps/documentation/directions/ for more documentation about that.

The xml returned from maps.googleapis.com include <html_instructions> tag which contains instruction like turn left or turn right. So you just need to parse that xml and use <html_instructions> tag for information you need on your listview.

I hope this helps.

Upvotes: 6

Related Questions