I have built the following url with source and destination points as follows
String jsonURL = "http://maps.googleapis.com/maps/api/directions/json?";
final StringBuffer sBuf = new StringBuffer(jsonURL);
sBuf.append("origin=");
sBuf.append(start.getLatitudeE6()/1E6);
sBuf.append(',');
sBuf.append(start.getLongitudeE6()/1E6);
sBuf.append("&destination=");
sBuf.append(dest.getLatitudeE6()/1E6);
sBuf.append(',');
sBuf.append(dest.getLongitudeE6()/1E6);
sBuf.append("&sensor=true&mode=driving");
Final url is
http://maps.googleapis.com/maps/api/directions/json?origin=17.449672,78.373002&destination=40.686245,-93.399375&sensor=true&mode=driving
But I am getting "routes" : []. So that I am unable to draw the path betweeen source and destination. Can any one tell me what went wrong here.