根据关键字或地理范围搜索 entity 实时位置,即上传至鹰眼服务端的最新位置。例如:根据名称搜索车辆,或搜索周边的车辆、矩形或多边形范围内的车辆等。
entity 管理类接口实现 entity 的创建、更新、删除、查询。包括四个接口:
目前中国主要有以下三种坐标系:
WGS84:为一种大地坐标系,也是目前广泛使用的GPS全球卫星定位系统使用的坐标系
GCJ02:是由中国国家测绘局制订的地理信息系统的坐标系统。由WGS84坐标系经加密后的坐标系
BD09:为百度坐标系,在GCJ02坐标系基础上再次加密。其中bd09ll表示百度经纬度坐标,bd09mc表示百度墨卡托米制坐标
非中国地区地图,统一使用WGS84坐标
鹰眼 Web服务API v3.0的默认输入输出参数为百度坐标(BD09),同时可通过"coord_type","coord_type_input","coord_type_output"(以各服务参数介绍为准)控制输入输出的坐标类型,鹰眼将自动完成转换。
根据关键字搜索entity,并返回实时位置。
https://yingyan.baidu.com/api/v3/entity/search
//GET请求
返回值见通用返回结果

根据矩形地理范围搜索entity,并返回实时位置
https://yingyan.baidu.com/api/v3/entity/boundsearch
//GET 请求
返回值见通用返回结果

根据圆心半径搜索entity,并返回实时位置
https://yingyan.baidu.com/api/v3/entity/aroundsearch
//GET 请求
返回值见通用返回结果

搜索多边形范围内的entity
https://yingyan.baidu.com/api/v3/entity/polygonsearch
//GET请求
返回值见通用返回结果
https://yingyan.baidu.com/api/v3/entity/polygonsearch?service_id=127980&vertexes=40.023759,116.20621;40.027737,116.532762;39.794407,116.570132;39.79485,116.201036;40.023759,116.20621&coord_type_input=wgs84&coord_type_output=bd09ll&ak=< 用户的AK>
搜索中国范围内,国家、省、市、区/县中的entity
https://yingyan.baidu.com/api/v3/entity/districtsearch
//GET请求
https://yingyan.baidu.com/api/v3/entity/districtsearch&service_id=12789&keyword=北京&return_type=simple&filter=inactive_time:1496194480&ak=< 用户的AK >
1. 关键字匹配至唯一行政区,且return_type=simple
{"status": 0,"message": "成功","total": 1078}
2. 关键字匹配至唯一行政区,且return_type=all 见通用返回结果
3. 关键字匹配至多个行政区
{status: 2,message: "检查到多个行政区划",district_list: ["北京市朝阳区","辽宁省朝阳市","辽宁省朝阳市朝阳县","吉林省长春市朝阳区"]}
entity 搜索类接口通用返回结果
{"status": 0,"message": "成功","size": 2,"total": 2,"entities": [{"entity_name": "小王","create_time": "2016-11-01 11:56:32","modify_time": "2016-11-01 13:27:59","latest_location": {"loc_time": 1477978078,"longitude": 116.3189288575,"latitude": 40.04780579193,"direction": 64,"height": 53,"radius": 4,"speed": 37.73},"city": "北京","district": "海淀","entity_desc": "小王_01"},{"entity_name": "小明","create_time": "2017-03-15 15:56:04","modify_time": "2017-06-01 14:01:31","latest_location": {"loc_time": 1488785466,"longitude": 116.45644006808,"latitude": 39.929082990815,"direction": 12,"height": 113.76,"radius": 3,"speed": 15.23},"city": "北京","district": "海淀","entity_desc": "小明_01"}]}
上一篇
下一篇
本篇文章对您是否有帮助?