Code example for Address

Methods: getLatitude, getLongitude

0
	public static final void getRoute(Address src, Address dest, Context ctx) {
		sb = new StringBuilder();
		sb.append("http://maps.google.com/maps/api/directions/json?");
 
		sb.append("origin=");
		sb.append(src.getLatitude() + "," + src.getLongitude());
		sb.append("&destination=");
		sb.append(dest.getLatitude() + "," + dest.getLongitude());
		sb.append("&sensor=true");
 
		String url = sb.toString();
		Log.d(TAG, url);
		HttpClient client = new DefaultHttpClient();
		HttpGet httpget = new HttpGet(url);
		HttpResponse response;
		try { 
			response = client.execute(httpget);
			HttpEntity entity = response.getEntity();
			is = entity.getContent();
			DirectionsResponseParser.parseDirections(is);
			is.close();