publicclassMainActivityextendsActionBarActivityimplementsDCACallBack{ /** * Get the Google Direction between mDevice location and the touched location using the Walk * @param point */ privatevoidgetDirections(LatLng point) { GDirectionsApiUtils.getDirection(this, mDeviceLatlong, point, 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 publicvoidonDirectionLoaded(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); } }