allroutes接口

URL:

http:// <BusServer-URL> / allroutes

父资源:

BusServer

[ 服务说明 ]

allroutes 接口用于以分页的形式返回所有的公交路线。

[ 参数说明 ]

[ 请求接口参数 ]
参数 参数说明
start    参数是否必须:
   参数含义:获取记录的起始位置,值>=1
limit    参数是否必须:
   参数含义:从起始位置开始要返回的记录条数
[ 返回结果参数 ]
参数参数说明
state 参数含义:状态,true 表示成功,false 表示失败
arrayid参数含义:公交路线的ID 编号
name参数含义:公交路线的名称

[ 示例 ]

allroutes请求接口示例:
http://127.0.0.1:8099/newmap/rest/services/公交/changzhibus/BusServer/allroutes?start=1&limit=5&format= json

[ 返回结果 ]

   allroutes操作成功时的返回结果示例 :

{"state":true,"array":[{"id":0,"name":"1 路(上行)"},{"id":1,"name":"1 路(下行)"}, {"id":2,"name":"2 路(上行)"},{"id":3,"name":"2 路(下行)"},{"id":4,"name":"6 路(上行)"}]}

    allroutes操作失败时的返回结果示例 :

{
"state":false,"describe":"Missing 'start'Parameter"}