根据经纬度查询附近站点

经纬度可以通过各个地图厂家的坐标拾取器进行获取

测试地址:

{url}/dev-api/customer/livebus/nearbyStations?lng=115.98486&lat=36.508405

生产地址:

{url}/api/customer/livebus/nearbyStations?lng=115.98486&lat=36.508405

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

具体请求

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

body:

请求参数说明

参数名 类型 是否必填 说明 示例
lng String 经度 115.98486
lat String 纬度 36.508405

响应参数

成功响应示例

  1. {
  2. "msg": "操作成功",
  3. "code": 200,
  4. "data": [
  5. {
  6. "nowLat": 115.98486,
  7. "lng": 115.899540000000,
  8. "distance": 6883986.600000001,
  9. "nowLng": 36.508405,
  10. "stationName": "土闸村",
  11. "lat": 36.655190000000,
  12. "stationId": "55200610083107337000"
  13. },
  14. {
  15. "nowLat": 115.98486,
  16. "lng": 115.900200000000,
  17. "distance": 6884900.0,
  18. "nowLng": 36.508405,
  19. "stationName": "季屯",
  20. "lat": 36.645490000000,
  21. "stationId": "55200610083023974000"
  22. },
  23. {
  24. "nowLat": 115.98486,
  25. "lng": 115.900220000000,
  26. "distance": 6885088.5,
  27. "nowLng": 36.508405,
  28. "stationName": "邢屯",
  29. "lat": 36.643540000000,
  30. "stationId": "55200610082947611000"
  31. },
  32. {
  33. "nowLat": 115.98486,
  34. "lng": 115.899970000000,
  35. "distance": 6885513.3,
  36. "nowLng": 36.508405,
  37. "stationName": "郑屯",
  38. "lat": 36.639280000000,
  39. "stationId": "55200610082848747000"
  40. },
  41. {
  42. "nowLat": 115.98486,
  43. "lng": 115.895160000000,
  44. "distance": 6886044.600000001,
  45. "nowLng": 36.508405,
  46. "stationName": "许屯",
  47. "lat": 36.635970000000,
  48. "stationId": "55200610082813744000"
  49. },
  50. {
  51. "nowLat": 115.98486,
  52. "lng": 115.886260000000,
  53. "distance": 6886440.7,
  54. "nowLng": 36.508405,
  55. "stationName": "张樊村",
  56. "lat": 36.635890000000,
  57. "stationId": "55200610082658752000"
  58. },
  59. {
  60. "nowLat": 115.98486,
  61. "lng": 116.091870000000,
  62. "distance": 6887198.7,
  63. "nowLng": 36.508405,
  64. "stationName": "北杨集副站",
  65. "lat": 36.535660000000,
  66. "stationId": "55130813091959953000"
  67. },
  68. {
  69. "nowLat": 115.98486,
  70. "lng": 116.088860000000,
  71. "distance": 6887336.0,
  72. "nowLng": 36.508405,
  73. "stationName": "瓜园",
  74. "lat": 36.535600000000,
  75. "stationId": "55131227132821322055"
  76. },
  77. {
  78. "nowLat": 115.98486,
  79. "lng": 115.879910000000,
  80. "distance": 6887479.3,
  81. "nowLng": 36.508405,
  82. "stationName": "靳庄",
  83. "lat": 36.628050000000,
  84. "stationId": "55200610082539214000"
  85. },
  86. {
  87. "nowLat": 115.98486,
  88. "lng": 115.878980000000,
  89. "distance": 6887647.100000001,
  90. "nowLng": 36.508405,
  91. "stationName": "侯庄",
  92. "lat": 36.626740000000,
  93. "stationId": "55200610082438678000"
  94. }
  95. ]
  96. }

失败响应示例

响应参数说明

参数名 说明 备注
code 返回码 为200表示成功,非200表示调用失败,其他错误码请见返回码说明
msg 返回码的文本描述内容
data 返回数据
nowLat 当前地点纬度
lng 站点经度
distance 当前地点与该站点距离 单位:米
nowLng 当前地点经度
stationName 站点名称
lat 站点纬度
stationId 站点ID

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

注意事项:
暂无

image.png
时间:2022年3月2日 15:17:47
回复:数据不对的问题,暂时不处理。