marchdev-tk / google_directions_api

The Directions API is a service that calculates directions between locations. You can search for directions for several modes of transportation, including transit, driving, walking, or cycling.
BSD 3-Clause "New" or "Revised" License
16 stars 14 forks source link

path in Step does not exist anymore from the response. #6

Closed fifanrg closed 3 years ago

fifanrg commented 3 years ago

Direction response now returns format like:

```json { "steps": [ { "distance": { "text": "0.3 km", "value": 288 }, "duration": { "text": "1 min", "value": 30 }, "end_location": { "lat": -33.9558569, "lng": 150.9960093 }, "html_instructions": "Head north on Stevens St toward Tower St", "polyline": { "points": "`ognEeirx[AAi@Om@CiCQWCuBUkCY" }, "start_location": { "lat": -33.9584125, "lng": 150.9955523 }, "travel_mode": "DRIVING" }, { "distance": { "text": "0.7 km", "value": 726 }, "duration": { "text": "2 mins", "value": 116 }, "end_location": { "lat": -33.9568371, "lng": 151.0037384 }, "html_instructions": "Turn right onto Tower St
Go through 1 roundabout
", "maneuver": "turn-right", "polyline": { "points": "b_gnEalrx[N}B?I@ODc@@UNcCFcA@ODe@JuADq@TwDB_@ZqEZaFPqC?k@?E@MA??AA??AAA?AAA?A?A?A?A?A?A?A?A@??A?A@??A@??A@??A@??A@?Lm@" }, "start_location": { "lat": -33.9558569, "lng": 150.9960093 }, "travel_mode": "DRIVING" }, { "distance": { "text": "1.2 km", "value": 1208 }, "duration": { "text": "2 mins", "value": 123 }, "end_location": { "lat": -33.9584708, "lng": 151.0166296 }, "html_instructions": "Continue onto Tower St
Go through 1 roundabout
", "polyline": { "points": "fegnEk|sx[J{ANaCF}@Z}El@mJTgDF{@f@eIDe@AOB}@A??AA??AA??AAA?A?A?A?A?A?A?A?A?A@??A?A@??A@??A@??A@?@?Fc@Hg@?GDg@b@yGl@wJFw@Fu@JkB" }, "start_location": { "lat": -33.9568371, "lng": 151.0037384 }, "travel_mode": "DRIVING" }, { "distance": { "text": "0.3 km", "value": 316 }, "duration": { "text": "1 min", "value": 46 }, "end_location": { "lat": -33.9556397, "lng": 151.0168743 }, "html_instructions": "Turn left onto The River Rd", "maneuver": "turn-left", "polyline": { "points": "lognE}lvx[eFS{EQsBI" }, "start_location": { "lat": -33.9584708, "lng": 151.0166296 }, "travel_mode": "DRIVING" } } ``` there is no step.path field in the response.
OlehMarch commented 3 years ago

Added parsing of polyline in 0.8.0 version