Skip to content
MathiasSeguy-Android2EE edited this page Sep 13, 2013 · 10 revisions

This project is done to help you using the Google Rest Api Direction : http://maps.googleapis.com/maps/api/directions/json?

` /****************************************************************************************// * 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);
	}
}
`
Clone this wiki locally