Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Affichage
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline

GDirectionsApiUtils: A GitHub project open source to display the routes between two points with AndroidMap V2

14
September
2013

GDirectionsApiUtils: A GitHub project open source to display the routes between two points with AndroidMap V2

Android2EE - Expertise - Formation - Consulting Android
Hi all
I was putting in place a conference on GoogleMap V2 for Android when I wanted to display the route between two points. For this he must use the Rest Google service called Direction https://developers.google.com/maps/documentation/directions/, retrieve the data, the parser and display.

Itinéraire entre deux points

Route between two points


It is rather tedious, so I searched for a project doing it already. And I have not found, so I did. It is located on GitHub: GDirectionsApiUtils.
Thus the GDirectionsApiUtils project allows you to ultra easy to implement this functionality within your application.
How it works, download the jar (gdirectionsapiutils.jar in the bin folder) and place the in the your project libs folder. Then you've more to use it:
public class MainActivity extends ActionBarActivity implements DCACallBack {}
/**
* Get the Google Direction between mDevice rental and the touched rental using the Walk
* @param point
*/
Private Sub getDirections (point LatLng) {}
GDirectionsApiUtils.getDirection (mDcaCallBack, startPoint, endPoint, GDirectionsApiUtils.MODE_WALKING);
}

/*
* The callback
* When the direction is built from the google server and parsed, this method is called and give you the expected direction
*/
@Override
public void onDirectionLoaded (List directions) {}
Display the direction or use the DirectionsApiUtils
for(GDirection direction:directions) {}
Log.e("MainActivity", "onDirectionLoaded: Draw GDirections Called with path" + directions);
GDirectionsApiUtils.drawGDirection (direction, mMap);
}
}

Rotate the information around you, I'm sure that an Android developer will be happy.

Itinéraires

Routes


And more if you want to improve the project, it is with pleasure that I expect a helping hand, I asked the base, but is not added flourishes that would be the welcome:)

Mathias Séguy
This email address is being protected from spambots. You need JavaScript enabled to view it.

Founder Android2EE
Training - Expertise - Consulting Android.
EBooks learn programming Android.
AndroidEvolution

Find me on Google +.
Follow me on Twitter
Join my LinkedIn network or Viadeo

You must be connected to post a comment.

Original author: MathiasSeguy
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Affichage
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline