Javascript 访问数组中的数组React native?中的JSON对象列表:[未处理的承诺拒绝:TypeError:undefined不是对象
我正在尝试从Google Directions获取数据,我想访问这个JSON响应的transit_details部分。下面是一个在获取过程中成功的响应示例。(请原谅这个长示例),但我想从transit_details获取值,它是一个位于Step和legs数组中的对象 这是我得到的实际对象表示响应,根据在transit下可以在此处找到的google directions文档,我成功获得了如下所示的响应: [![在此处输入图像描述][1][1]Javascript 访问数组中的数组React native?中的JSON对象列表:[未处理的承诺拒绝:TypeError:undefined不是对象,javascript,google-maps,react-native,google-directions-api,Javascript,Google Maps,React Native,Google Directions Api,我正在尝试从Google Directions获取数据,我想访问这个JSON响应的transit_details部分。下面是一个在获取过程中成功的响应示例。(请原谅这个长示例),但我想从transit_details获取值,它是一个位于Step和legs数组中的对象 这是我得到的实际对象表示响应,根据在transit下可以在此处找到的google directions文档,我成功获得了如下所示的响应: [![在此处输入图像描述][1][1] Object { "geocoded_wa
Object {
"geocoded_waypoints": Array [
Object {
"geocoder_status": "OK",
"place_id": "ChIJ2YDFT9zweUgRgt5Tws6n3hs",
"types": Array [
"premise",
],
},
Object {
"geocoder_status": "OK",
"place_id": "ChIJW2PCihXxeUgRRWgA9kOzpjY",
"types": Array [
"establishment",
"food",
"lodging",
"point_of_interest",
"restaurant",
],
},
],
"routes": Array [
Object {
"bounds": Object {
"northeast": Object {
"lat": 52.9242042,
"lng": -1.466251,
},
"southwest": Object {
"lat": 52.9004767,
"lng": -1.4801554,
},
},
"copyrights": "Map data ©2018 Google",
"legs": Array [
Object {
"arrival_time": Object {
"text": "9:21am",
"time_zone": "Europe/London",
"value": 1524558107,
},
"departure_time": Object {
"text": "8:56am",
"time_zone": "Europe/London",
"value": 1524556589,
},
"distance": Object {
"text": "3.4 km",
"value": 3407,
},
"duration": Object {
"text": "25 mins",
"value": 1518,
},
"end_address": "Full St, Derby DE1 3AF, UK",
"end_location": Object {
"lat": 52.9242042,
"lng": -1.4756769,
},
"start_address": "50 Chatham St, Derby DE23 8TH, UK",
"start_location": Object {
"lat": 52.9004767,
"lng": -1.480144,
},
"steps": Array [
Object {
"distance": Object {
"text": "0.2 km",
"value": 175,
},
"duration": Object {
"text": "2 mins",
"value": 123,
},
"end_location": Object {
"lat": 52.900963,
"lng": -1.478217,
},
"html_instructions": "Walk to Randolph Road",
"polyline": Object {
"points": "_c{aIza`Hm@BEyHC_Ag@S?H",
},
"start_location": Object {
"lat": 52.9004767,
"lng": -1.480144,
},
"steps": Array [
Object {
"distance": Object {
"text": "26 m",
"value": 26,
},
"duration": Object {
"text": "1 min",
"value": 18,
},
"end_location": Object {
"lat": 52.9007148,
"lng": -1.4801554,
},
"html_instructions": "Head <b>north</b> on <b>Chatham St</b> toward <b>Randolph Rd</b>",
"polyline": Object {
"points": "_c{aIza`Hm@B",
},
"start_location": Object {
"lat": 52.9004767,
"lng": -1.480144,
},
"travel_mode": "WALKING",
},
Object {
"distance": Object {
"text": "0.1 km",
"value": 126,
},
"duration": Object {
"text": "1 min",
"value": 88,
},
"end_location": Object {
"lat": 52.9007561,
"lng": -1.4782714,
},
"html_instructions": "Turn <b>right</b> onto <b>Randolph Rd</b>",
"maneuver": "turn-right",
"polyline": Object {
"points": "md{aI~a`HEyHC_A",
},
"start_location": Object {
"lat": 52.9007148,
"lng": -1.4801554,
},
"travel_mode": "WALKING",
},
Object {
"distance": Object {
"text": "23 m",
"value": 23,
},
"duration": Object {
"text": "1 min",
"value": 17,
},
"end_location": Object {
"lat": 52.900963,
"lng": -1.478217,
},
"html_instructions": "Turn <b>left</b> onto <b>St Thomas Rd</b><div style=\"font-size:0.9em\">Destination will be on the left</div>",
"maneuver": "turn-left",
"polyline": Object {
"points": "wd{aIdv_Hg@S?H",
},
"start_location": Object {
"lat": 52.9007561,
"lng": -1.4782714,
},
"travel_mode": "WALKING",
},
],
"travel_mode": "WALKING",
},
Object {
"distance": Object {
"text": "2.5 km",
"value": 2460,
},
"duration": Object {
"text": "15 mins",
"value": 900,
},
"end_location": Object {
"lat": 52.91829079999999,
"lng": -1.4748049,
},
"html_instructions": "Bus towards Derby",
"polyline": Object {
"points": "_f{aIzu_HsPw@eHgW_IkOmHcPoLiNgKxQwHvL{LxKuK`G",
},
"start_location": Object {
"lat": 52.900963,
"lng": -1.478217,
},
"transit_details": Object {
"arrival_stop": Object {
"location": Object {
"lat": 52.91829079999999,
"lng": -1.4748049,
},
"name": "Osmaston Road (Stop A8)",
},
"arrival_time": Object {
"text": "9:13am",
"time_zone": "Europe/London",
"value": 1524557580,
},
"departure_stop": Object {
"location": Object {
"lat": 52.900963,
"lng": -1.478217,
},
"name": "Randolph Road",
},
"departure_time": Object {
"text": "8:58am",
"time_zone": "Europe/London",
"value": 1524556715,
},
"headsign": "Derby",
"line": Object {
"agencies": Array [
Object {
"name": "Arriva Midlands",
"url": "http://www.traveline.info/",
},
],
"color": "#11416d",
"name": "Sapphire 38",
"text_color": "#ffffff",
"vehicle": Object {
"icon": "//maps.gstatic.com/mapfiles/transit/iw2/6/bus2.png",
"name": "Bus",
"type": "BUS",
},
},
"num_stops": 9,
},
"travel_mode": "TRANSIT",
},
Object {
"distance": Object {
我的fetch调用位于函数内部的原因是,我的render/view部分有一个文本输入和一个fetchdirection函数按钮
render(){
return(
<View style={styles.container}>
<Mainlogo/>
<TextInput style={styles.boxInput} underlineColorAndroid='rgba(0,0,0,0)' placeholder="Going To?"
underlineColorAndroid='transparent'
onChangeText={(dest) => this.setState({goingto : dest})}
/>
<TouchableOpacity style={styles.button} onPress={this.fetchDirections.bind(this)}>
<Text style={styles.textButton}> Go {this.props.type}</Text>
</TouchableOpacity> ... truncated from a larger code
结果如下:
10:46:28
Object {
"bounds": Object {
"northeast": Object {
"lat": 52.9242042,
"lng": -1.466251,
},
"southwest": Object {
"lat": 52.90047759999999,
"lng": -1.4801554,
},
},
"copyrights": "Map data ©2018 Google",
"legs": Array [
Object {
"arrival_time": Object {
"text": "11:17am",
"time_zone": "Europe/London",
"value": 1524565078,
},
"departure_time": Object {
"text": "10:48am",
"time_zone": "Europe/London",
"value": 1524563326,
},
"distance": Object {
"text": "3.8 km",
"value": 3796,
},
"duration": Object {
"text": "29 mins",
"value": 1752,
},
"end_address": "Full St, Derby DE1 3AF, UK",
"end_location": Object {
"lat": 52.9242042,
"lng": -1.4756769,
},
"start_address": "50 Chatham St, Derby DE23 8TH, UK",
"start_location": Object {
"lat": 52.90047759999999,
"lng": -1.480144,
},
"steps": Array [
Object {
"distance": Object {
"text": "0.2 km",
"value": 175,
},
"duration": Object {
"text": "2 mins",
"value": 123,
},
"end_location": Object {
"lat": 52.900963,
"lng": -1.478217,
},
"html_instructions": "Walk to Randolph Road",
"polyline": Object {
"points": "_c{aIza`Hm@BEyHC_Ag@S?H",
},
"start_location": Object {
"lat": 52.90047759999999,
"lng": -1.480144,
},
"steps": Array [
Object {
"distance": Object {
"text": "26 m",
"value": 26,
},
"duration": Object {
"text": "1 min",
"value": 18,
},
"end_location": Object {
"lat": 52.9007148,
"lng": -1.4801554,
},
"html_instructions": "Head <b>north</b> on <b>Chatham St</b> toward <b>Randolph Rd</b>",
"polyline": Object {
"points": "_c{aIza`Hm@B",
},
"start_location": Object {
"lat": 52.90047759999999,
"lng": -1.480144,
},
"travel_mode": "WALKING",
},
Object {
"distance": Object {
"text": "0.1 km",
"value": 126,
},
"duration": Object {
"text": "1 min",
"value": 88,
},
"end_location": Object {
"lat": 52.9007561,
"lng": -1.4782714,
},
"html_instructions": "Turn <b>right</b> onto <b>Randolph Rd</b>",
"maneuver": "turn-right",
"polyline": Object {
"points": "md{aI~a`HEyHC_A",
},
"start_location": Object {
"lat": 52.9007148,
"lng": -1.4801554,
},
"travel_mode": "WALKING",
},
Object {
"distance": Object {
"text": "23 m",
"value": 23,
},
"duration": Object {
"text": "1 min",
"value": 17,
},
"end_location": Object {
"lat": 52.900963,
"lng": -1.478217,
},
"html_instructions": "Turn <b>left</b> onto <b>St Thomas Rd</b><div style=\"font-size:0.9em\">Destination will be on the left</div>",
"maneuver": "turn-left",
"polyline": Object {
"points": "wd{aIdv_Hg@S?H",
},
"start_location": Object {
"lat": 52.9007561,
"lng": -1.4782714,
},
"travel_mode": "WALKING",
},
],
"travel_mode": "WALKING",
},
Object {
"distance": Object {
"text": "3.1 km",
"value": 3129,
},
"duration": Object {
"text": "20 mins",
"value": 1200,
},
"end_location": Object {
"lat": 52.92222599999999,
"lng": -1.471283,
},
"html_instructions": "Bus towards Derby",
"polyline": Object {
"points": "_f{aIzu_HsPw@eHgW_IkOmHcPoLiNgKxQwHvL{LxKuK`G{AqEJoPcU`A",
},
"start_location": Object {
"lat": 52.900963,
"lng": -1.478217,
},
"transit_details": Object {
"arrival_stop": Object {
"location": Object {
"lat": 52.92222599999999,
"lng": -1.471283,
},
"name": "Bus Station (Bay 19)",
},
"arrival_time": Object {
"text": "11:12am",
"time_zone": "Europe/London",
"value": 1524564720,
},
"departure_stop": Object {
"location": Object {
"lat": 52.900963,
"lng": -1.478217,
},
"name": "Randolph Road",
},
"departure_time": Object {
"text": "10:50am",
"time_zone": "Europe/London",
"value": 1524563452,
},
"headsign": "Derby",
"line": Object {
"agencies": Array [
Object {
"name": "Arriva Midlands",
"url": "http://www.traveline.info/",
},
],
"color": "#11416d",
"name": "Sapphire 38",
"text_color": "#ffffff",
"vehicle": Object {
"icon": "//maps.gstatic.com/mapfiles/transit/iw2/6/bus2.png",
"name": "Bus",
"type": "BUS",
},
},
"num_stops": 12,
},
"travel_mode": "TRANSIT",
},
Object {
"distance": Object {
"text": "0.5 km",
"value": 492,
},
"duration": Object {
"text": "6 mins",
"value": 368,
},
"end_location": Object {
"lat": 52.9242042,
"lng": -1.4756769,
},
"html_instructions": "Walk to Full St, Derby DE1 3AF, UK",
"polyline": Object {
"points": "}j_bInj~GEJlAjCt@rAi@dCCFQz@Yv@a@t@Wb@IJGFUREAAAA?A@A?A?A?C@CDA??@CBAFA@?@AF[VGLiAl@MFMHCICCCACAG@GDCFAFKFIDIFE@OPONMLa@h@?@",
},
"start_location": Object {
"lat": 52.92222599999999,
"lng": -1.471283,
},
"steps": Array [
Object {
"distance": Object {
"text": "0.1 km",
"value": 105,
},
"duration": Object {
"text": "1 min",
"value": 80,
},
"end_location": Object {
"lat": 52.9216,
"lng": -1.4724555,
},
"html_instructions": "Head <b>southwest</b> toward <b>Morledge</b>",
"polyline": Object {
"points": "}j_bInj~GEJlAjCt@rA",
},
"start_location": Object {
"lat": 52.92222599999999,
"lng": -1.471283,
},
"travel_mode": "WALKING",
},
Object {
"distance": Object {
"text": "0.2 km",
"value": 171,
},
"duration": Object {
"text": "2 mins",
"value": 117,
},
"end_location": Object {
"lat": 52.922543,
"lng": -1.4743966,
},
"html_instructions": "Turn <b>right</b> onto <b>Morledge</b>",
"maneuver": "turn-right",
"polyline": Object {
"points": "_g_bIzq~Gi@dCCFQz@Yv@a@t@Wb@IJGFUR",
},
"start_location": Object {
"lat": 52.9216,
"lng": -1.4724555,
},
"travel_mode": "WALKING",
},
Object {
"distance": Object {
"text": "0.1 km",
"value": 111,
},
"duration": Object {
"text": "2 mins",
"value": 90,
},
"end_location": Object {
"lat": 52.9234218,
"lng": -1.4750736,
},
"html_instructions": "At the roundabout, take the <b>3rd</b> exit onto <b>68</b>/<b>Corporation St</b>/<b>Route 54</b>",
"maneuver": "roundabout-left",
"polyline": Object {
"points": "{l_bI~}~GEAAAA?A@A?A?A?C@CDA??@CBAFA@?@AF[VGLiAl@MFMH",
},
"start_location": Object {
"lat": 52.922543,
"lng": -1.4743966,
},
"travel_mode": "WALKING",
},
Object {
"distance": Object {
"text": "0.1 km",
"value": 105,
},
"duration": Object {
"text": "1 min",
"value": 81,
},
"end_location": Object {
"lat": 52.9242042,
"lng": -1.4756769,
},
"html_instructions": "At the roundabout, take the <b>2nd</b> exit onto <b>Full St</b><div style=\"font-size:0.9em\">Destination will be on the right</div>",
"maneuver": "roundabout-left",
"polyline": Object {
"points": "kr_bIdb_HCICCCACAG@GDCFAFKFIDIFE@OPONMLa@h@?@",
},
"start_location": Object {
"lat": 52.9234218,
"lng": -1.4750736,
},
"travel_mode": "WALKING",
},
],
"travel_mode": "WALKING",
},
],
"traffic_speed_entry": Array [],
"via_waypoint": Array [],
},
],
"overview_polyline": Object {
"points": "_c{aIza`Hm@BEyHC_Ag@S?HsPw@eHgW_IkOmHcPoLiNgKxQwHvL{LxKuK`G{AqEJoPcU`AEJlAjCt@rAm@lCQz@Yv@y@xAQRUREAAAG@KFGNAHc@d@wAt@MHCIGEK?KLAFKFSLUR_AhA",
},
"summary": "",
"warnings": Array [
"Walking directions are in beta. Use caution – This route may be missing sidewalks or pedestrian paths.",
],
"waypoint_order": Array [],
}
10:46:28
反对{
“边界”:对象{
“东北”:对象{
“lat”:52.9242042,
“液化天然气”:-1.466251,
},
“西南”:目标{
“lat”:52.900477599999,
“液化天然气”:-1.4801554,
},
},
“版权”:“地图数据©2018谷歌”,
“腿”:数组[
反对{
“到达时间”:对象{
“文本”:“上午11:17”,
“时区”:“欧洲/伦敦”,
“价值”:1524565078,
},
“出发时间”:对象{
“文本”:“上午10:48”,
“时区”:“欧洲/伦敦”,
“价值”:1524563326,
},
“距离”:对象{
“文字”:“3.8公里”,
“价值”:3796,
},
“持续时间”:对象{
“文本”:“29分钟”,
“价值”:1752年,
},
“结束地址”:“英国Derby DE1 3AF全街”,
“结束位置”:对象{
“lat”:52.9242042,
“液化天然气”:-1.4756769,
},
“起始地址”:“英国德比第8街查塔姆街50号”,
“开始位置”:对象{
“lat”:52.900477599999,
“液化天然气”:-1.480144,
},
“步骤”:数组[
反对{
“距离”:对象{
“文本”:“0.2公里”,
“价值”:175,
},
“持续时间”:对象{
“文本”:“2分钟”,
“价值”:123,
},
“结束位置”:对象{
“lat”:52.900963,
“液化天然气”:-1.478217,
},
“html_说明”:“步行至伦道夫路”,
“多段线”:对象{
“点”:“_c{aIza`Hm@BEyHC_Ag@S?H“,
},
“开始位置”:对象{
“lat”:52.900477599999,
“液化天然气”:-1.480144,
},
“步骤”:数组[
反对{
“距离”:对象{
“文本”:“26米”,
“价值”:26,
},
“持续时间”:对象{
“文本”:“1分钟”,
“价值”:18,
},
“结束位置”:对象{
“lat”:52.9007148,
“液化天然气”:-1.4801554,
},
“html_说明”:“沿查塔姆街向北驶向伦道夫路”,
“多段线”:对象{
“点”:“_c{aIza`Hm@B",
},
“开始位置”:对象{
“lat”:52.900477599999,
“液化天然气”:-1.480144,
},
“旅行模式”:“步行”,
},
反对{
“距离”:对象{
“文本”:“0.1公里”,
“价值”:126,
},
“持续时间”:对象{
“文本”:“1分钟”,
“价值”:88,
},
“结束位置”:对象{
“lat”:52.9007561,
“液化天然气”:-1.4782714,
},
“html_说明”:“右转到伦道夫路”,
“机动”:“右转”,
“多段线”:对象{
“要点”:“md{aI~a`HEyHC_a”,
},
“开始位置”:对象{
“lat”:52.9007148,
“液化天然气”:-1.4801554,
},
“旅行模式”:“步行”,
},
反对{
“距离”:对象{
“文本”:“23M”,
“价值”:23,
},
“持续时间”:对象{
“文本”:“1分钟”,
“价值”:17,
},
“结束位置”:对象{
“lat”:52.900963,
“液化天然气”:-1.478217,
},
“html_说明”:“左转至圣托马斯,目的地将在左侧”,
“机动”:“左转”,
“多段线”:对象{
“点”:“wd{aIdv_Hg@S?H“,
},
“开始位置”:对象{
“lat”:52.9007561,
“液化天然气”:-1.4782714,
},
“旅行模式”:“步行”,
},
],
“旅行模式”:“步行”,
},
反对{
“距离”:对象{
“文字”:“3.1公里”,
“价值”:3129,
},
“持续时间”:对象{
“文本”:“20分钟”,
“价值”:1200,
},
“结束位置”:对象{
“lat”:52.922225999999,
“液化天然气”:-1.471283,
},
“html_指令”:“通往德比的巴士”,
“多段线”:对象{
“要点”:“_f{aIzu_HsPw@eHgW_IkOmHcPoLiNgKxQwHvL{LxKuK`G{AqEJoPcU`A”,
},
“开始位置”:对象{
“lat”:52.900963,
“液化天然气”:-1.478217,
},
“transit_详细信息”:对象{
“到达/停止”:对象{
“位置”:对象{
“lat”:52.922225999999,
“液化天然气”:-1.471283,
},
“名称”:“公交车站(19号站台)”,
},
“到达时间”:对象{
“文本”:“上午11:12”,
“时区”:“欧洲/伦敦”,
“价值”:1524564720,
render(){
return(
<View style={styles.container}>
<Mainlogo/>
<TextInput style={styles.boxInput} underlineColorAndroid='rgba(0,0,0,0)' placeholder="Going To?"
underlineColorAndroid='transparent'
onChangeText={(dest) => this.setState({goingto : dest})}
/>
<TouchableOpacity style={styles.button} onPress={this.fetchDirections.bind(this)}>
<Text style={styles.textButton}> Go {this.props.type}</Text>
</TouchableOpacity> ... truncated from a larger code
var info = responseJson3.routes[0];
console.log(info);
10:46:28
Object {
"bounds": Object {
"northeast": Object {
"lat": 52.9242042,
"lng": -1.466251,
},
"southwest": Object {
"lat": 52.90047759999999,
"lng": -1.4801554,
},
},
"copyrights": "Map data ©2018 Google",
"legs": Array [
Object {
"arrival_time": Object {
"text": "11:17am",
"time_zone": "Europe/London",
"value": 1524565078,
},
"departure_time": Object {
"text": "10:48am",
"time_zone": "Europe/London",
"value": 1524563326,
},
"distance": Object {
"text": "3.8 km",
"value": 3796,
},
"duration": Object {
"text": "29 mins",
"value": 1752,
},
"end_address": "Full St, Derby DE1 3AF, UK",
"end_location": Object {
"lat": 52.9242042,
"lng": -1.4756769,
},
"start_address": "50 Chatham St, Derby DE23 8TH, UK",
"start_location": Object {
"lat": 52.90047759999999,
"lng": -1.480144,
},
"steps": Array [
Object {
"distance": Object {
"text": "0.2 km",
"value": 175,
},
"duration": Object {
"text": "2 mins",
"value": 123,
},
"end_location": Object {
"lat": 52.900963,
"lng": -1.478217,
},
"html_instructions": "Walk to Randolph Road",
"polyline": Object {
"points": "_c{aIza`Hm@BEyHC_Ag@S?H",
},
"start_location": Object {
"lat": 52.90047759999999,
"lng": -1.480144,
},
"steps": Array [
Object {
"distance": Object {
"text": "26 m",
"value": 26,
},
"duration": Object {
"text": "1 min",
"value": 18,
},
"end_location": Object {
"lat": 52.9007148,
"lng": -1.4801554,
},
"html_instructions": "Head <b>north</b> on <b>Chatham St</b> toward <b>Randolph Rd</b>",
"polyline": Object {
"points": "_c{aIza`Hm@B",
},
"start_location": Object {
"lat": 52.90047759999999,
"lng": -1.480144,
},
"travel_mode": "WALKING",
},
Object {
"distance": Object {
"text": "0.1 km",
"value": 126,
},
"duration": Object {
"text": "1 min",
"value": 88,
},
"end_location": Object {
"lat": 52.9007561,
"lng": -1.4782714,
},
"html_instructions": "Turn <b>right</b> onto <b>Randolph Rd</b>",
"maneuver": "turn-right",
"polyline": Object {
"points": "md{aI~a`HEyHC_A",
},
"start_location": Object {
"lat": 52.9007148,
"lng": -1.4801554,
},
"travel_mode": "WALKING",
},
Object {
"distance": Object {
"text": "23 m",
"value": 23,
},
"duration": Object {
"text": "1 min",
"value": 17,
},
"end_location": Object {
"lat": 52.900963,
"lng": -1.478217,
},
"html_instructions": "Turn <b>left</b> onto <b>St Thomas Rd</b><div style=\"font-size:0.9em\">Destination will be on the left</div>",
"maneuver": "turn-left",
"polyline": Object {
"points": "wd{aIdv_Hg@S?H",
},
"start_location": Object {
"lat": 52.9007561,
"lng": -1.4782714,
},
"travel_mode": "WALKING",
},
],
"travel_mode": "WALKING",
},
Object {
"distance": Object {
"text": "3.1 km",
"value": 3129,
},
"duration": Object {
"text": "20 mins",
"value": 1200,
},
"end_location": Object {
"lat": 52.92222599999999,
"lng": -1.471283,
},
"html_instructions": "Bus towards Derby",
"polyline": Object {
"points": "_f{aIzu_HsPw@eHgW_IkOmHcPoLiNgKxQwHvL{LxKuK`G{AqEJoPcU`A",
},
"start_location": Object {
"lat": 52.900963,
"lng": -1.478217,
},
"transit_details": Object {
"arrival_stop": Object {
"location": Object {
"lat": 52.92222599999999,
"lng": -1.471283,
},
"name": "Bus Station (Bay 19)",
},
"arrival_time": Object {
"text": "11:12am",
"time_zone": "Europe/London",
"value": 1524564720,
},
"departure_stop": Object {
"location": Object {
"lat": 52.900963,
"lng": -1.478217,
},
"name": "Randolph Road",
},
"departure_time": Object {
"text": "10:50am",
"time_zone": "Europe/London",
"value": 1524563452,
},
"headsign": "Derby",
"line": Object {
"agencies": Array [
Object {
"name": "Arriva Midlands",
"url": "http://www.traveline.info/",
},
],
"color": "#11416d",
"name": "Sapphire 38",
"text_color": "#ffffff",
"vehicle": Object {
"icon": "//maps.gstatic.com/mapfiles/transit/iw2/6/bus2.png",
"name": "Bus",
"type": "BUS",
},
},
"num_stops": 12,
},
"travel_mode": "TRANSIT",
},
Object {
"distance": Object {
"text": "0.5 km",
"value": 492,
},
"duration": Object {
"text": "6 mins",
"value": 368,
},
"end_location": Object {
"lat": 52.9242042,
"lng": -1.4756769,
},
"html_instructions": "Walk to Full St, Derby DE1 3AF, UK",
"polyline": Object {
"points": "}j_bInj~GEJlAjCt@rAi@dCCFQz@Yv@a@t@Wb@IJGFUREAAAA?A@A?A?A?C@CDA??@CBAFA@?@AF[VGLiAl@MFMHCICCCACAG@GDCFAFKFIDIFE@OPONMLa@h@?@",
},
"start_location": Object {
"lat": 52.92222599999999,
"lng": -1.471283,
},
"steps": Array [
Object {
"distance": Object {
"text": "0.1 km",
"value": 105,
},
"duration": Object {
"text": "1 min",
"value": 80,
},
"end_location": Object {
"lat": 52.9216,
"lng": -1.4724555,
},
"html_instructions": "Head <b>southwest</b> toward <b>Morledge</b>",
"polyline": Object {
"points": "}j_bInj~GEJlAjCt@rA",
},
"start_location": Object {
"lat": 52.92222599999999,
"lng": -1.471283,
},
"travel_mode": "WALKING",
},
Object {
"distance": Object {
"text": "0.2 km",
"value": 171,
},
"duration": Object {
"text": "2 mins",
"value": 117,
},
"end_location": Object {
"lat": 52.922543,
"lng": -1.4743966,
},
"html_instructions": "Turn <b>right</b> onto <b>Morledge</b>",
"maneuver": "turn-right",
"polyline": Object {
"points": "_g_bIzq~Gi@dCCFQz@Yv@a@t@Wb@IJGFUR",
},
"start_location": Object {
"lat": 52.9216,
"lng": -1.4724555,
},
"travel_mode": "WALKING",
},
Object {
"distance": Object {
"text": "0.1 km",
"value": 111,
},
"duration": Object {
"text": "2 mins",
"value": 90,
},
"end_location": Object {
"lat": 52.9234218,
"lng": -1.4750736,
},
"html_instructions": "At the roundabout, take the <b>3rd</b> exit onto <b>68</b>/<b>Corporation St</b>/<b>Route 54</b>",
"maneuver": "roundabout-left",
"polyline": Object {
"points": "{l_bI~}~GEAAAA?A@A?A?A?C@CDA??@CBAFA@?@AF[VGLiAl@MFMH",
},
"start_location": Object {
"lat": 52.922543,
"lng": -1.4743966,
},
"travel_mode": "WALKING",
},
Object {
"distance": Object {
"text": "0.1 km",
"value": 105,
},
"duration": Object {
"text": "1 min",
"value": 81,
},
"end_location": Object {
"lat": 52.9242042,
"lng": -1.4756769,
},
"html_instructions": "At the roundabout, take the <b>2nd</b> exit onto <b>Full St</b><div style=\"font-size:0.9em\">Destination will be on the right</div>",
"maneuver": "roundabout-left",
"polyline": Object {
"points": "kr_bIdb_HCICCCACAG@GDCFAFKFIDIFE@OPONMLa@h@?@",
},
"start_location": Object {
"lat": 52.9234218,
"lng": -1.4750736,
},
"travel_mode": "WALKING",
},
],
"travel_mode": "WALKING",
},
],
"traffic_speed_entry": Array [],
"via_waypoint": Array [],
},
],
"overview_polyline": Object {
"points": "_c{aIza`Hm@BEyHC_Ag@S?HsPw@eHgW_IkOmHcPoLiNgKxQwHvL{LxKuK`G{AqEJoPcU`AEJlAjCt@rAm@lCQz@Yv@y@xAQRUREAAAG@KFGNAHc@d@wAt@MHCIGEK?KLAFKFSLUR_AhA",
},
"summary": "",
"warnings": Array [
"Walking directions are in beta. Use caution – This route may be missing sidewalks or pedestrian paths.",
],
"waypoint_order": Array [],
}