Улучшенный ответ Кенни, который работает для меня, я изменил несколько вещей в соответствии со мной.Как введен LatLng вместо геопункта.Я публикую рабочий код, который является модифицированной версией ответа Кенни.Все кредиты достаются Кенни, а не мне!
Важный момент:
Передать адрес в строковом формате.например: toronto
скопировать эту функцию:
private void GetDistance(String src, String dest) {
String s = src.replaceAll("\\s","+");
String d = dest.replaceAll("\\s","+");
StringBuilder urlString = new StringBuilder();
urlString.append("http://maps.googleapis.com/maps/api/directions/json?");
urlString.append("origin=");
urlString.append((s));
urlString.append("&destination=");
urlString.append((d));
urlString.append("&mode=driving&sensor=true");
Log.d("xxx", "URL=" + urlString.toString());
// get the JSON And parse it to get the directions data.
HttpURLConnection urlConnection = null;
URL url = null;
try {
url = new URL(urlString.toString());
urlConnection = (HttpURLConnection) url.openConnection();
urlConnection.setRequestMethod("GET");
urlConnection.setDoOutput(true);
urlConnection.setDoInput(true);
urlConnection.connect();
InputStream inStream = urlConnection.getInputStream();
BufferedReader bReader = new BufferedReader(new InputStreamReader(inStream));
String temp, response = "";
while ((temp = bReader.readLine()) != null) {
//Parse data
response += temp;
}
//Close the reader, stream & connection
bReader.close();
inStream.close();
urlConnection.disconnect();
//Sortout JSONresponse
JSONObject object = (JSONObject) new JSONTokener(response).nextValue();
JSONArray array = object.getJSONArray("routes");
Log.d("xxx", "array: " + array.toString());
//Routes is a combination of objects and arrays
JSONObject routes = array.getJSONObject(0);
Log.d("xxx", "routes: " + routes.toString());
//String summary = routes.getString("summary");
//Log.d("JSON","summary: "+summary);
JSONArray legs = routes.getJSONArray("legs");
Log.d("xxx", "legs: " + legs.toString());
JSONObject steps = legs.getJSONObject(0);
Log.d("JSON", "steps: " + steps.toString());
JSONObject distance = steps.getJSONObject("distance");
Log.d("xxx", "distance: " + distance.toString());
String sDistance = distance.getString("text");
int iDistance = distance.getInt("value");
Log.d("SEE THE DIST : ", "" + sDistance + iDistance);
} catch (IOException e) {
e.printStackTrace();
} catch (JSONException e) {
e.printStackTrace();
}
}
Поскольку эта функция выполняет сетевые операции, мы должны использовать AsyncTask следующим образом:
private class Task extends AsyncTask<Void, Void, Void> {
@Override
protected Void doInBackground(Void... params) {
GetDistance(from, to);
return null;
}
}
LOG CAT:
01-05 17:01:08.657 3736-3820/in.test D/xxx: URL=http://maps.googleapis.com/maps/api/directions/json?origin=MP+Chowk+Thane+West+Thane,+Maharashtra+400080+&destination=Ghatkopar+West,+Mumbai,+Maharashtra,+India&mode=driving&sensor=true
01-05 17:01:08.687 3736-3736/in.test W/IInputConnectionWrapper: beginBatchEdit on inactive InputConnection
01-05 17:01:08.687 3736-3736/in.test W/IInputConnectionWrapper: endBatchEdit on inactive InputConnection
01-05 17:01:08.797 3736-3778/in.test V/RenderScript: Application requested CPU execution
01-05 17:01:08.807 3736-3778/in.test V/RenderScript: 0xb97768c0 Launching thread(s), CPUs 4
01-05 17:01:09.097 3736-3820/in.test D/xxx: array: [{"bounds":{"northeast":{"lat":19.1885561,"lng":72.9686183},"southwest":{"lat":19.0842303,"lng":72.9075409}},"copyrights":"Map data ©2016 Google","legs":[{"distance":{"text":"15.8 km","value":15818},"duration":{"text":"26 mins","value":1562},"end_address":"Ghatkopar West, Mumbai, Maharashtra, India","end_location":{"lat":19.0908134,"lng":72.9076817},"start_address":"MP Chowk, Thane West, Thane, Maharashtra 400080, India","start_location":{"lat":19.1855772,"lng":72.9556247},"steps":[{"distance":{"text":"27 m","value":27},"duration":{"text":"1 min","value":6},"end_location":{"lat":19.185599,"lng":72.9558468},"html_instructions":"Head <b>northeast<\/b> on <b>MP Chowk<\/b> toward <b>SG Barve Rd<\/b>","polyline":{"points":"{dbtBsch|L?AA?AA?AA??AAAAA?A?A?AAA?A?A?A?A?A?A@A?A@A?A@A?A@A"},"start_location":{"lat":19.1855772,"lng":72.9556247},"travel_mode":"DRIVING"},{"distance":{"text":"0.9 km","value":870},"duration":{"text":"3 mins","value":165},"end_location":{"lat":19.1883648,"lng":72.963413},"html_instructions":"Exit the roundabout onto <b>Lal Bahadur Shastri Marg<\/b><div style=\"font-size:0.9em\">Pass by Wagle Estate Post Office (on the left)<\/div>","polyline":{"points":"_ebtBaeh|LWoAOcAEe@A_AA{AMcBEQC]COOqAk@sDcAaE_@_Ac@}@[o@o@aAk@w@k@w@e@{@s@{AWm@"},"start_location":{"lat":19.185599,"lng":72.9558468},"travel_mode":"DRIVING"},{"distance":{"text":"2.4 km","value":2448},"duration":{"text":"5 mins","value":316},"end_location":{"lat":19.16823,"lng":72.96618509999999},"html_instructions":"Turn <b>right<\/b> to merge onto <b>NH 3<\/b><div style=\"font-size:0.9em\">Partial toll road<\/div>","polyline":{"points":"gvbtBiti|LQYIOCEGKXEZGp@QvM}CnAWLCNCL?X?jFsAp@QlGaBt@Qh@Of@Mz@WXIRI`@MNGRKrB_AxCqAbCaAz@]^Mb@Mr@Ob@IbDg@v@O|B]XEvAW~@OLAPCN?Z?r@@tG^r@Df@F`@HzDt@lAZl@RrAr@bAn@vC`BtD~B"},"start_location":{"lat":19.1883648,"lng":72.963413},"travel_mode":"DRIVING"},{"distance":{"text":"5.6 km","value":5599},"duration":{"text":"5 mins","value":320},"end_location":{"lat":19.1249579,"lng":72.9390226},"html_instructions":"Keep <b>right<\/b> to stay on <b>NH 3<\/b><div style=\"font-size:0.9em\">Partial toll road<\/div>","maneuver":"keep-right","polyline":{"points":"mx~sBuej|LnEnCnElCXNXNtFhDtFhDnc@jW|AbAtL|GZPTN@@@?B@DD@?DB`@X@?rN|I|BtAb@T~X~NzNtHd_@vRhHtDNJh@ZrCzAh@XxAt@lAn@zo@l\\p@ZdCjA~Bz@fGjB"},"start_location":{"lat":19.16823,"lng":72.96618509999999},"travel_mode":"DRIVING"},{"distance":{"text":"1.5 km","value":1518},"duration":{"text":"2 mins","value":95},"end_location":{"lat":19.1122651,"lng":72.93371189999999},"html_instructions":"Keep <b>left<\/b> to stay on <b>NH 3<\/b>","maneuver":"keep-left","polyline":{"points":"_jvsB{{d|LtCt@v@VxAj@jKjDj@Pt`@zLrKfD~HhC"},"start_location":{"lat":19.1249579,"lng":72.9390226},"travel_mode":"DRIVING"},{"distance":{"text":"2.4 km","value":2371},"duration":{"text":"2 mins","value":139},"end_location":{"lat":19.0923682,"lng":72.9255933},"html_instructions":"Keep <b>right<\/b> to stay on <b>NH 3<\/b>","maneuver":"keep-right","polyline":{"points":"uzssBuzc|LrQlFd@Nd@N|XrInBn@zBp@vQpF`F|AjVpH~PfFzAh@"},"start_location":{"lat":19.1122651,"lng":72.93371189999999},"travel_mode":"DRIVING"},{"distance":{"text":"0.9 km","value":921},"duration":{"text":"1 min","value":54},"end_location":{"lat":19.0849757,"lng":72.9217895},"html_instructions":"Continue straight to stay on <b>NH 3<\/b>","maneuver":"straight","polyline":{"points":"i~osB}gb|LZJ|NlEXHTHn@R|@VvAb@tC~@b@NTHh@TB?TJNHZNTL`@T`@Vr@f@d@^`E~C"},"start_location":{"lat":19.0923682,"lng":72.9255933},"travel_mode":"DRIVING"},{"distance":{"text":"0.1 km","value":132},"duration":{"text":"1 min","value":18},"end_location":{"lat":19.0842303,"lng":72.92085449999999},"html_instructions":"Take the exit on the <b>right<\/b> toward <b>Link Rd<\/b>","maneuver":"ramp-right","polyline":{"points":"cpnsBepa|LBV@@@@rBlBDDBDDF@FFT"},"start_location":{"lat":19.0849757,"lng":72.9217895},"travel_mode":"DRIVING"},{"distance":{"text":"0.3 km","value":275},"duration":{"text":"1 min","value":47},"end_location":{"lat":19.0862782,"lng":72.9194201},"html_i
01-05 17:01:09.107 3736-3820/in.test D/xxx: routes: {"bounds":{"northeast":{"lat":19.1885561,"lng":72.9686183},"southwest":{"lat":19.0842303,"lng":72.9075409}},"copyrights":"Map data ©2016 Google","legs":[{"distance":{"text":"15.8 km","value":15818},"duration":{"text":"26 mins","value":1562},"end_address":"Ghatkopar West, Mumbai, Maharashtra, India","end_location":{"lat":19.0908134,"lng":72.9076817},"start_address":"MP Chowk, Thane West, Thane, Maharashtra 400080, India","start_location":{"lat":19.1855772,"lng":72.9556247},"steps":[{"distance":{"text":"27 m","value":27},"duration":{"text":"1 min","value":6},"end_location":{"lat":19.185599,"lng":72.9558468},"html_instructions":"Head <b>northeast<\/b> on <b>MP Chowk<\/b> toward <b>SG Barve Rd<\/b>","polyline":{"points":"{dbtBsch|L?AA?AA?AA??AAAAA?A?A?AAA?A?A?A?A?A?A@A?A@A?A@A?A@A"},"start_location":{"lat":19.1855772,"lng":72.9556247},"travel_mode":"DRIVING"},{"distance":{"text":"0.9 km","value":870},"duration":{"text":"3 mins","value":165},"end_location":{"lat":19.1883648,"lng":72.963413},"html_instructions":"Exit the roundabout onto <b>Lal Bahadur Shastri Marg<\/b><div style=\"font-size:0.9em\">Pass by Wagle Estate Post Office (on the left)<\/div>","polyline":{"points":"_ebtBaeh|LWoAOcAEe@A_AA{AMcBEQC]COOqAk@sDcAaE_@_Ac@}@[o@o@aAk@w@k@w@e@{@s@{AWm@"},"start_location":{"lat":19.185599,"lng":72.9558468},"travel_mode":"DRIVING"},{"distance":{"text":"2.4 km","value":2448},"duration":{"text":"5 mins","value":316},"end_location":{"lat":19.16823,"lng":72.96618509999999},"html_instructions":"Turn <b>right<\/b> to merge onto <b>NH 3<\/b><div style=\"font-size:0.9em\">Partial toll road<\/div>","polyline":{"points":"gvbtBiti|LQYIOCEGKXEZGp@QvM}CnAWLCNCL?X?jFsAp@QlGaBt@Qh@Of@Mz@WXIRI`@MNGRKrB_AxCqAbCaAz@]^Mb@Mr@Ob@IbDg@v@O|B]XEvAW~@OLAPCN?Z?r@@tG^r@Df@F`@HzDt@lAZl@RrAr@bAn@vC`BtD~B"},"start_location":{"lat":19.1883648,"lng":72.963413},"travel_mode":"DRIVING"},{"distance":{"text":"5.6 km","value":5599},"duration":{"text":"5 mins","value":320},"end_location":{"lat":19.1249579,"lng":72.9390226},"html_instructions":"Keep <b>right<\/b> to stay on <b>NH 3<\/b><div style=\"font-size:0.9em\">Partial toll road<\/div>","maneuver":"keep-right","polyline":{"points":"mx~sBuej|LnEnCnElCXNXNtFhDtFhDnc@jW|AbAtL|GZPTN@@@?B@DD@?DB`@X@?rN|I|BtAb@T~X~NzNtHd_@vRhHtDNJh@ZrCzAh@XxAt@lAn@zo@l\\p@ZdCjA~Bz@fGjB"},"start_location":{"lat":19.16823,"lng":72.96618509999999},"travel_mode":"DRIVING"},{"distance":{"text":"1.5 km","value":1518},"duration":{"text":"2 mins","value":95},"end_location":{"lat":19.1122651,"lng":72.93371189999999},"html_instructions":"Keep <b>left<\/b> to stay on <b>NH 3<\/b>","maneuver":"keep-left","polyline":{"points":"_jvsB{{d|LtCt@v@VxAj@jKjDj@Pt`@zLrKfD~HhC"},"start_location":{"lat":19.1249579,"lng":72.9390226},"travel_mode":"DRIVING"},{"distance":{"text":"2.4 km","value":2371},"duration":{"text":"2 mins","value":139},"end_location":{"lat":19.0923682,"lng":72.9255933},"html_instructions":"Keep <b>right<\/b> to stay on <b>NH 3<\/b>","maneuver":"keep-right","polyline":{"points":"uzssBuzc|LrQlFd@Nd@N|XrInBn@zBp@vQpF`F|AjVpH~PfFzAh@"},"start_location":{"lat":19.1122651,"lng":72.93371189999999},"travel_mode":"DRIVING"},{"distance":{"text":"0.9 km","value":921},"duration":{"text":"1 min","value":54},"end_location":{"lat":19.0849757,"lng":72.9217895},"html_instructions":"Continue straight to stay on <b>NH 3<\/b>","maneuver":"straight","polyline":{"points":"i~osB}gb|LZJ|NlEXHTHn@R|@VvAb@tC~@b@NTHh@TB?TJNHZNTL`@T`@Vr@f@d@^`E~C"},"start_location":{"lat":19.0923682,"lng":72.9255933},"travel_mode":"DRIVING"},{"distance":{"text":"0.1 km","value":132},"duration":{"text":"1 min","value":18},"end_location":{"lat":19.0842303,"lng":72.92085449999999},"html_instructions":"Take the exit on the <b>right<\/b> toward <b>Link Rd<\/b>","maneuver":"ramp-right","polyline":{"points":"cpnsBepa|LBV@@@@rBlBDDBDDF@FFT"},"start_location":{"lat":19.0849757,"lng":72.9217895},"travel_mode":"DRIVING"},{"distance":{"text":"0.3 km","value":275},"duration":{"text":"1 min","value":47},"end_location":{"lat":19.0862782,"lng":72.9194201},"html_i
01-05 17:01:09.107 3736-3820/in.test D/xxx: legs: [{"distance":{"text":"15.8 km","value":15818},"duration":{"text":"26 mins","value":1562},"end_address":"Ghatkopar West, Mumbai, Maharashtra, India","end_location":{"lat":19.0908134,"lng":72.9076817},"start_address":"MP Chowk, Thane West, Thane, Maharashtra 400080, India","start_location":{"lat":19.1855772,"lng":72.9556247},"steps":[{"distance":{"text":"27 m","value":27},"duration":{"text":"1 min","value":6},"end_location":{"lat":19.185599,"lng":72.9558468},"html_instructions":"Head <b>northeast<\/b> on <b>MP Chowk<\/b> toward <b>SG Barve Rd<\/b>","polyline":{"points":"{dbtBsch|L?AA?AA?AA??AAAAA?A?A?AAA?A?A?A?A?A?A@A?A@A?A@A?A@A"},"start_location":{"lat":19.1855772,"lng":72.9556247},"travel_mode":"DRIVING"},{"distance":{"text":"0.9 km","value":870},"duration":{"text":"3 mins","value":165},"end_location":{"lat":19.1883648,"lng":72.963413},"html_instructions":"Exit the roundabout onto <b>Lal Bahadur Shastri Marg<\/b><div style=\"font-size:0.9em\">Pass by Wagle Estate Post Office (on the left)<\/div>","polyline":{"points":"_ebtBaeh|LWoAOcAEe@A_AA{AMcBEQC]COOqAk@sDcAaE_@_Ac@}@[o@o@aAk@w@k@w@e@{@s@{AWm@"},"start_location":{"lat":19.185599,"lng":72.9558468},"travel_mode":"DRIVING"},{"distance":{"text":"2.4 km","value":2448},"duration":{"text":"5 mins","value":316},"end_location":{"lat":19.16823,"lng":72.96618509999999},"html_instructions":"Turn <b>right<\/b> to merge onto <b>NH 3<\/b><div style=\"font-size:0.9em\">Partial toll road<\/div>","polyline":{"points":"gvbtBiti|LQYIOCEGKXEZGp@QvM}CnAWLCNCL?X?jFsAp@QlGaBt@Qh@Of@Mz@WXIRI`@MNGRKrB_AxCqAbCaAz@]^Mb@Mr@Ob@IbDg@v@O|B]XEvAW~@OLAPCN?Z?r@@tG^r@Df@F`@HzDt@lAZl@RrAr@bAn@vC`BtD~B"},"start_location":{"lat":19.1883648,"lng":72.963413},"travel_mode":"DRIVING"},{"distance":{"text":"5.6 km","value":5599},"duration":{"text":"5 mins","value":320},"end_location":{"lat":19.1249579,"lng":72.9390226},"html_instructions":"Keep <b>right<\/b> to stay on <b>NH 3<\/b><div style=\"font-size:0.9em\">Partial toll road<\/div>","maneuver":"keep-right","polyline":{"points":"mx~sBuej|LnEnCnElCXNXNtFhDtFhDnc@jW|AbAtL|GZPTN@@@?B@DD@?DB`@X@?rN|I|BtAb@T~X~NzNtHd_@vRhHtDNJh@ZrCzAh@XxAt@lAn@zo@l\\p@ZdCjA~Bz@fGjB"},"start_location":{"lat":19.16823,"lng":72.96618509999999},"travel_mode":"DRIVING"},{"distance":{"text":"1.5 km","value":1518},"duration":{"text":"2 mins","value":95},"end_location":{"lat":19.1122651,"lng":72.93371189999999},"html_instructions":"Keep <b>left<\/b> to stay on <b>NH 3<\/b>","maneuver":"keep-left","polyline":{"points":"_jvsB{{d|LtCt@v@VxAj@jKjDj@Pt`@zLrKfD~HhC"},"start_location":{"lat":19.1249579,"lng":72.9390226},"travel_mode":"DRIVING"},{"distance":{"text":"2.4 km","value":2371},"duration":{"text":"2 mins","value":139},"end_location":{"lat":19.0923682,"lng":72.9255933},"html_instructions":"Keep <b>right<\/b> to stay on <b>NH 3<\/b>","maneuver":"keep-right","polyline":{"points":"uzssBuzc|LrQlFd@Nd@N|XrInBn@zBp@vQpF`F|AjVpH~PfFzAh@"},"start_location":{"lat":19.1122651,"lng":72.93371189999999},"travel_mode":"DRIVING"},{"distance":{"text":"0.9 km","value":921},"duration":{"text":"1 min","value":54},"end_location":{"lat":19.0849757,"lng":72.9217895},"html_instructions":"Continue straight to stay on <b>NH 3<\/b>","maneuver":"straight","polyline":{"points":"i~osB}gb|LZJ|NlEXHTHn@R|@VvAb@tC~@b@NTHh@TB?TJNHZNTL`@T`@Vr@f@d@^`E~C"},"start_location":{"lat":19.0923682,"lng":72.9255933},"travel_mode":"DRIVING"},{"distance":{"text":"0.1 km","value":132},"duration":{"text":"1 min","value":18},"end_location":{"lat":19.0842303,"lng":72.92085449999999},"html_instructions":"Take the exit on the <b>right<\/b> toward <b>Link Rd<\/b>","maneuver":"ramp-right","polyline":{"points":"cpnsBepa|LBV@@@@rBlBDDBDDF@FFT"},"start_location":{"lat":19.0849757,"lng":72.9217895},"travel_mode":"DRIVING"},{"distance":{"text":"0.3 km","value":275},"duration":{"text":"1 min","value":47},"end_location":{"lat":19.0862782,"lng":72.9194201},"html_instructions":"Continue onto <b>Link Rd<\/b><div style=\"font-size:0.9em\">Pass by A 3 (on the left)<\/div>","polyline":{"points":"mknsBija|LIRoDtB{BpAcB`A"
01-05 17:01:09.117 3736-3820/in.test D/JSON: steps: {"distance":{"text":"15.8 km","value":15818},"duration":{"text":"26 mins","value":1562},"end_address":"Ghatkopar West, Mumbai, Maharashtra, India","end_location":{"lat":19.0908134,"lng":72.9076817},"start_address":"MP Chowk, Thane West, Thane, Maharashtra 400080, India","start_location":{"lat":19.1855772,"lng":72.9556247},"steps":[{"distance":{"text":"27 m","value":27},"duration":{"text":"1 min","value":6},"end_location":{"lat":19.185599,"lng":72.9558468},"html_instructions":"Head <b>northeast<\/b> on <b>MP Chowk<\/b> toward <b>SG Barve Rd<\/b>","polyline":{"points":"{dbtBsch|L?AA?AA?AA??AAAAA?A?A?AAA?A?A?A?A?A?A@A?A@A?A@A?A@A"},"start_location":{"lat":19.1855772,"lng":72.9556247},"travel_mode":"DRIVING"},{"distance":{"text":"0.9 km","value":870},"duration":{"text":"3 mins","value":165},"end_location":{"lat":19.1883648,"lng":72.963413},"html_instructions":"Exit the roundabout onto <b>Lal Bahadur Shastri Marg<\/b><div style=\"font-size:0.9em\">Pass by Wagle Estate Post Office (on the left)<\/div>","polyline":{"points":"_ebtBaeh|LWoAOcAEe@A_AA{AMcBEQC]COOqAk@sDcAaE_@_Ac@}@[o@o@aAk@w@k@w@e@{@s@{AWm@"},"start_location":{"lat":19.185599,"lng":72.9558468},"travel_mode":"DRIVING"},{"distance":{"text":"2.4 km","value":2448},"duration":{"text":"5 mins","value":316},"end_location":{"lat":19.16823,"lng":72.96618509999999},"html_instructions":"Turn <b>right<\/b> to merge onto <b>NH 3<\/b><div style=\"font-size:0.9em\">Partial toll road<\/div>","polyline":{"points":"gvbtBiti|LQYIOCEGKXEZGp@QvM}CnAWLCNCL?X?jFsAp@QlGaBt@Qh@Of@Mz@WXIRI`@MNGRKrB_AxCqAbCaAz@]^Mb@Mr@Ob@IbDg@v@O|B]XEvAW~@OLAPCN?Z?r@@tG^r@Df@F`@HzDt@lAZl@RrAr@bAn@vC`BtD~B"},"start_location":{"lat":19.1883648,"lng":72.963413},"travel_mode":"DRIVING"},{"distance":{"text":"5.6 km","value":5599},"duration":{"text":"5 mins","value":320},"end_location":{"lat":19.1249579,"lng":72.9390226},"html_instructions":"Keep <b>right<\/b> to stay on <b>NH 3<\/b><div style=\"font-size:0.9em\">Partial toll road<\/div>","maneuver":"keep-right","polyline":{"points":"mx~sBuej|LnEnCnElCXNXNtFhDtFhDnc@jW|AbAtL|GZPTN@@@?B@DD@?DB`@X@?rN|I|BtAb@T~X~NzNtHd_@vRhHtDNJh@ZrCzAh@XxAt@lAn@zo@l\\p@ZdCjA~Bz@fGjB"},"start_location":{"lat":19.16823,"lng":72.96618509999999},"travel_mode":"DRIVING"},{"distance":{"text":"1.5 km","value":1518},"duration":{"text":"2 mins","value":95},"end_location":{"lat":19.1122651,"lng":72.93371189999999},"html_instructions":"Keep <b>left<\/b> to stay on <b>NH 3<\/b>","maneuver":"keep-left","polyline":{"points":"_jvsB{{d|LtCt@v@VxAj@jKjDj@Pt`@zLrKfD~HhC"},"start_location":{"lat":19.1249579,"lng":72.9390226},"travel_mode":"DRIVING"},{"distance":{"text":"2.4 km","value":2371},"duration":{"text":"2 mins","value":139},"end_location":{"lat":19.0923682,"lng":72.9255933},"html_instructions":"Keep <b>right<\/b> to stay on <b>NH 3<\/b>","maneuver":"keep-right","polyline":{"points":"uzssBuzc|LrQlFd@Nd@N|XrInBn@zBp@vQpF`F|AjVpH~PfFzAh@"},"start_location":{"lat":19.1122651,"lng":72.93371189999999},"travel_mode":"DRIVING"},{"distance":{"text":"0.9 km","value":921},"duration":{"text":"1 min","value":54},"end_location":{"lat":19.0849757,"lng":72.9217895},"html_instructions":"Continue straight to stay on <b>NH 3<\/b>","maneuver":"straight","polyline":{"points":"i~osB}gb|LZJ|NlEXHTHn@R|@VvAb@tC~@b@NTHh@TB?TJNHZNTL`@T`@Vr@f@d@^`E~C"},"start_location":{"lat":19.0923682,"lng":72.9255933},"travel_mode":"DRIVING"},{"distance":{"text":"0.1 km","value":132},"duration":{"text":"1 min","value":18},"end_location":{"lat":19.0842303,"lng":72.92085449999999},"html_instructions":"Take the exit on the <b>right<\/b> toward <b>Link Rd<\/b>","maneuver":"ramp-right","polyline":{"points":"cpnsBepa|LBV@@@@rBlBDDBDDF@FFT"},"start_location":{"lat":19.0849757,"lng":72.9217895},"travel_mode":"DRIVING"},{"distance":{"text":"0.3 km","value":275},"duration":{"text":"1 min","value":47},"end_location":{"lat":19.0862782,"lng":72.9194201},"html_instructions":"Continue onto <b>Link Rd<\/b><div style=\"font-size:0.9em\">Pass by A 3 (on the left)<\/div>","polyline":{"points":"mknsBija|LIRoDtB{BpAcB`A
01-05 17:01:09.117 3736-3820/in.test D/xxx: distance: {"text":"15.8 km","value":15818}
01-05 17:01:09.117 3736-3820/in.test D/SEE THE DIST :: 15.8 km15818
СПАСИБО КЕННИ!