(7)坐标转换
import requests
key = 'xxx' #高德地图API
#坐标转换 将非高德坐标(GPS坐标、mapbar坐标、baidu坐标)转换成高德坐标
def assistant(locations:str,coordsys:str):
#coordsys可选值:gps;mapbar;baidu;autonavi(不进行转换)
parameters = {
'key':key,
'coordsys':coordsys,
'locations':locations,
}
r = requests.get('https://restapi.amap.com/v3/assistant/coordinate/convert?parameters',params=parameters)
data = r.json()
return data