POST api/bus/getroundbus

根据经纬度的中心点获取周边公交

默认返回json数据,若要返回xml格式数据在访问地址后加上xml=true

Request 信息

URI 参数

None.

Body 参数

参数

RoundModel
名称说明数据类型附加信息
Lat

纬度

decimal number

Required

Lng

经度

decimal number

Required

IsGisCoord

是否是Gis坐标 手机定位获取到的坐标为WGS,默认WGS

boolean

None.

Dist

可选,方圆多少米,默认500米

integer

Range: inclusive between 100 and 1000

Direction

可选,返回上下行

BusDirect

None.

City

城市

string

Required

Token

token

string

Required

Platform

string

None.

Request 数据格式

application/json, text/json

示例:
{
  "Lat": 1.0,
  "Lng": 2.0,
  "IsGisCoord": true,
  "Dist": 1,
  "Direction": 0,
  "City": "sample string 4",
  "Token": "sample string 5",
  "Platform": "sample string 6"
}

application/xml, text/xml

示例:
<RoundModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.Bus">
  <Platform xmlns="http://schemas.datacontract.org/2004/07/API.Models.API">sample string 6</Platform>
  <Token xmlns="http://schemas.datacontract.org/2004/07/API.Models.API">sample string 5</Token>
  <City xmlns="http://schemas.datacontract.org/2004/07/API.Models.API">sample string 4</City>
  <Direction>Both</Direction>
  <Dist>1</Dist>
  <IsGisCoord>true</IsGisCoord>
  <Lat>1</Lat>
  <Lng>2</Lng>
</RoundModel>

application/x-www-form-urlencoded

示例:

Response 信息

输出返回说明

结果

RoundBusResult
名称说明数据类型附加信息
Buses

符合条件的公交

Collection of RoundBus

None.

ErrorCode

API错误码

APIErrorCode

None.

Msg

附带消息

string

None.

Response 返回数据格式

application/json, text/json

示例:
{
  "Buses": [
    {
      "Name": "sample string 1",
      "Id": 2,
      "Direction": 0
    },
    {
      "Name": "sample string 1",
      "Id": 2,
      "Direction": 0
    }
  ],
  "ErrorCode": 0,
  "Msg": "sample string 1"
}

application/xml, text/xml

示例:
<RoundBusResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models.API.Bus">
  <ErrorCode xmlns="http://schemas.datacontract.org/2004/07/API.Models.API">SUCCESS</ErrorCode>
  <Msg xmlns="http://schemas.datacontract.org/2004/07/API.Models.API">sample string 1</Msg>
  <Buses>
    <RoundBusResult.RoundBus>
      <Direction>Both</Direction>
      <Id>2</Id>
      <Name>sample string 1</Name>
    </RoundBusResult.RoundBus>
    <RoundBusResult.RoundBus>
      <Direction>Both</Direction>
      <Id>2</Id>
      <Name>sample string 1</Name>
    </RoundBusResult.RoundBus>
  </Buses>
</RoundBusResult>