路线规划

调用流程
路线规划 - 图1

Ⅰ.调用“实时公交-附近站点”接口,获取出发点和终点附近站点 Ⅱ.调用“实时公交-路径规划”接口,获取所有换乘方案

测试地址:

{url}/dev-api/customer/livebus/getRoutePlanning

生产地址:

{url}/api/customer/livebus/getRoutePlanning

HTTP Method:GET
Content-Type: application/x-www-form-urlencoded

具体请求

header:
请求参数 说明
Authorization access_token 这里传登录获取的access_token

body:

请求参数说明

参数名 类型 是否必填 说明 示例
destStationIds String 终点附近站点ids 55130809094024372000,55130808163922128000,110927431135427549,080317574609520239,
55130814090423299000,55130808163516319000,55130813084004023000,080316005208150472,
080315164480260317,080317574649490506
endLngAndLat String 终点位置经纬度 115.98854,36.44417
originStationIds String 出发点附近站点ids 55130812141820389572,080319072406830001,55130812141641984536,080319072414260351,
55130812142008169687,080319072448560021,55130812154515213945,55130814143653145000,
080319072458920346,080319072401470034
startLngAndLat String 当前位置经纬度 115.98263,36.47697

响应参数

成功响应示例

  1. {
  2. "msg": "操作成功",
  3. "code": 200,
  4. "data": {
  5. "count": 1,
  6. "transits": [
  7. {
  8. "duration": 15,
  9. "walkingDistance": 0,
  10. "cost": 0,
  11. "buslines": [
  12. {
  13. "duration": 15,
  14. "viaStationList": [
  15. {
  16. "name": "汽车总站",
  17. "stationSpacing": 333,
  18. "stationTime": 1,
  19. "location": "115.982620000000,36.474120000000",
  20. "id": "55130812141641984536",
  21. "sn": 8
  22. },
  23. {
  24. "name": "柳园建设路口南",
  25. "stationSpacing": 538,
  26. "stationTime": 2,
  27. "location": "115.982680000000,36.471130000000",
  28. "id": "55130812141455872500",
  29. "sn": 9
  30. },
  31. {
  32. "name": "柳园路振兴路口南",
  33. "stationSpacing": 575,
  34. "stationTime": 2,
  35. "location": "115.982670000000,36.466300000000",
  36. "id": "55130812141229591443",
  37. "sn": 10
  38. },
  39. {
  40. "name": "五星百货",
  41. "stationSpacing": 199,
  42. "stationTime": 0,
  43. "location": "115.983040000000,36.461140000000",
  44. "id": "55130812141017974393",
  45. "sn": 11
  46. },
  47. {
  48. "name": "新东方广场",
  49. "stationSpacing": 419,
  50. "stationTime": 2,
  51. "location": "115.982760000000,36.459370000000",
  52. "id": "55130812140611181205",
  53. "sn": 12
  54. },
  55. {
  56. "name": "百大三联",
  57. "stationSpacing": 334,
  58. "stationTime": 1,
  59. "location": "115.982800000000,36.455610000000",
  60. "id": "55130814082840370000",
  61. "sn": 13
  62. },
  63. {
  64. "name": "电影院",
  65. "stationSpacing": 356,
  66. "stationTime": 1,
  67. "location": "115.982820000000,36.452610000000",
  68. "id": "55130814083557545000",
  69. "sn": 14
  70. },
  71. {
  72. "name": "新华书店",
  73. "stationSpacing": 578,
  74. "stationTime": 2,
  75. "location": "115.982860000000,36.449410000000",
  76. "id": "55130808161612759000",
  77. "sn": 15
  78. },
  79. {
  80. "name": "新时代广场",
  81. "stationSpacing": 398,
  82. "stationTime": 1,
  83. "location": "115.984100000000,36.444310000000",
  84. "id": "55130808163516319000",
  85. "sn": 16
  86. },
  87. {
  88. "name": "万恒眼科医院",
  89. "stationSpacing": 220,
  90. "stationTime": 1,
  91. "location": "115.988540000000,36.444170000000",
  92. "id": "55130808163658358000",
  93. "sn": 17
  94. }
  95. ],
  96. "distance": 4377,
  97. "viaNum": 11,
  98. "lineName": "K315路",
  99. "lineId": "315",
  100. "startTime": "06:25:00",
  101. "sn": 1,
  102. "endTime": "18:17:00",
  103. "departureStation": {
  104. "name": "万达广场柳园站",
  105. "location": "115.982630000000,36.476970000000",
  106. "id": "55130812141820389572"
  107. },
  108. "dir": 2,
  109. "arrivalStation": {
  110. "name": "畅博东关国际",
  111. "location": "115.990950000000,36.443790000000",
  112. "id": "55130808163922128000"
  113. }
  114. }
  115. ],
  116. "distance": 4377
  117. }
  118. ]
  119. }
  120. }

失败响应示例

响应参数说明

请打开该网址查看参数信息:http://tw.twgiot.com:38092/data-center/doc.html#/default/%E5%AE%9E%E6%97%B6%E5%85%AC%E4%BA%A4/getRoutePlanningUsingGET

注意事项:
暂无