根据经纬度查询附近站点
经纬度可以通过各个地图厂家的坐标拾取器进行获取
测试地址:
{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 |
响应参数
成功响应示例
{
"msg": "操作成功",
"code": 200,
"data": [
{
"nowLat": 115.98486,
"lng": 115.899540000000,
"distance": 6883986.600000001,
"nowLng": 36.508405,
"stationName": "土闸村",
"lat": 36.655190000000,
"stationId": "55200610083107337000"
},
{
"nowLat": 115.98486,
"lng": 115.900200000000,
"distance": 6884900.0,
"nowLng": 36.508405,
"stationName": "季屯",
"lat": 36.645490000000,
"stationId": "55200610083023974000"
},
{
"nowLat": 115.98486,
"lng": 115.900220000000,
"distance": 6885088.5,
"nowLng": 36.508405,
"stationName": "邢屯",
"lat": 36.643540000000,
"stationId": "55200610082947611000"
},
{
"nowLat": 115.98486,
"lng": 115.899970000000,
"distance": 6885513.3,
"nowLng": 36.508405,
"stationName": "郑屯",
"lat": 36.639280000000,
"stationId": "55200610082848747000"
},
{
"nowLat": 115.98486,
"lng": 115.895160000000,
"distance": 6886044.600000001,
"nowLng": 36.508405,
"stationName": "许屯",
"lat": 36.635970000000,
"stationId": "55200610082813744000"
},
{
"nowLat": 115.98486,
"lng": 115.886260000000,
"distance": 6886440.7,
"nowLng": 36.508405,
"stationName": "张樊村",
"lat": 36.635890000000,
"stationId": "55200610082658752000"
},
{
"nowLat": 115.98486,
"lng": 116.091870000000,
"distance": 6887198.7,
"nowLng": 36.508405,
"stationName": "北杨集副站",
"lat": 36.535660000000,
"stationId": "55130813091959953000"
},
{
"nowLat": 115.98486,
"lng": 116.088860000000,
"distance": 6887336.0,
"nowLng": 36.508405,
"stationName": "瓜园",
"lat": 36.535600000000,
"stationId": "55131227132821322055"
},
{
"nowLat": 115.98486,
"lng": 115.879910000000,
"distance": 6887479.3,
"nowLng": 36.508405,
"stationName": "靳庄",
"lat": 36.628050000000,
"stationId": "55200610082539214000"
},
{
"nowLat": 115.98486,
"lng": 115.878980000000,
"distance": 6887647.100000001,
"nowLng": 36.508405,
"stationName": "侯庄",
"lat": 36.626740000000,
"stationId": "55200610082438678000"
}
]
}
失败响应示例
响应参数说明
参数名 | 说明 | 备注 |
---|---|---|
code | 返回码 | 为200表示成功,非200表示调用失败,其他错误码请见返回码说明 |
msg | 返回码的文本描述内容 | |
data | 返回数据 | |
nowLat | 当前地点纬度 | |
lng | 站点经度 | |
distance | 当前地点与该站点距离 | 单位:米 |
nowLng | 当前地点经度 | |
stationName | 站点名称 | |
lat | 站点纬度 | |
stationId | 站点ID |
注意事项:
暂无
时间:2022年3月2日 15:17:47
回复:数据不对的问题,暂时不处理。