-
Notifications
You must be signed in to change notification settings - Fork 27
Just using GDirectionsApiUtils in your project
MathiasSeguy-Android2EE edited this page Sep 14, 2013
·
1 revision
If you just want to use the project in your Application.
Download the gdirectionsapiutils.jar and drop it in the libs folder of your project.
Then you can use it:
public class MainActivity extends ActionBarActivity implements DCACallBack{
/**
* Get the Google Direction between mDevice location and the touched location using the Walk
* @param point
*/
private void getDirections(LatLng point) {
GDirectionsApiUtils.getDirection(this, mDeviceLatlong, point, GDirectionsApiUtils.MODE_WALKING);
}/*
* (non-Javadoc)
*
* @see
* com.android2ee.formation.librairies.google.map.direction.DCACallBack#onDirectionLoaded(com
* .android2ee.formation.librairies.google.map.direction.GDirection)
*/
@Override
public void onDirectionLoaded(List<GDirection> 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);
}
}