一、接口功能:三网基站,秒级定位

二、实战演示:根据基站信息查询位置
下面通过 Python 代码调用该接口
接口地址:https://market.aliyun.com/detail/cmapi00065871
import urllib3
import json
host = 'https://market.aliyun.com/detail/cmapi00065871'
path = '/cell/index'
method = 'GET'
appcode = '你自己的AppCode' # 替换为真实 AppCode
querys = 'mnc=0&lac=33204&cellid=202944490'
url = host + path + '?' + querys
http = urllib3.PoolManager()
headers = {
'Authorization': 'APPCODE ' + appcode
}
response = http.request('GET', url, headers=headers)
content = response.data.decode('utf-8')
data = json.loads(content)
print(json.dumps(data, indent=2, ensure_ascii=False))
返回字段解析
| 字段 | 类型 | 说明 |
|---|---|---|
lat | string | 纬度(WGS84坐标系) |
lng | string | 经度(WGS84坐标系) |
radius | int | 定位精度半径(米),值越小精度越高 |
addr | string | 结构化地址描述 |

771

被折叠的 条评论
为什么被折叠?



