nearstations接口

URL:

http:// <BusServer-URL> / nearstations

父资源:

BusServer

[ 服务说明 ]

nearstations 接口用于搜索指定坐标点附近一定范围内的公交站点。

[ 参数说明 ]

[ 请求接口参数 ]
参数 参数说明
x    参数是否必须:
   参数含义:指定坐标点的经度
y    参数是否必须:
   参数含义:指定坐标点的纬度
distance    参数是否必须:
   参数含义:设定搜索范围,默认为500,单位为米
[ 返回结果参数 ]
参数参数说明
state 参数含义:状态,true 表示成功,false 表示失败
total 参数含义:站点的数目
arrayid参数含义:站点的ID 编号
name参数含义:站点的名称
geomtype参数含义:地理对象的类型
coordinates参数含义:地理对象的空间坐标

[ 示例 ]

nearstations请求接口示例:
http://127.0.0.1:8099/newmap/rest/services/公交/changzhibus/BusServer/nearstations?x=113.128384&y=36.217964&distance=700&format=json

[ 返回结果 ]

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

{"state":true,"total":3,"array":[{"id":77,"name":"长治职校北校区","geom":{"type":"Point"," coordinates":[113.122,36.217]}},{"id":78,"name":"长治职业学院","geom":{"type":"Point"," coordinates":[113.124,36.213]}},{"id":79,"name":"长治职业学院","geom":{"type":"Point"," coordinates":[113.124,36.214]}}]}

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

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