本文由来:客户的项目地点比较偏僻,检查人员不熟悉找不到地点;因此提供在 web 上选定地图坐标,提供二维码扫描的方式,方便检查人员获取导航地址
#请求url:
https://www.amap.com/service/shortUrl?&address=http://wb.amap.com/%3Fq%3D{lat}%2C{lng}%2C{address}%2C{post_code}%26src%3Dpc_sms_poi
#替换
lat
lng
address 用于地图显示的名称,可不填
post_code 用于地图显示的邮编,可不填
请求返回:
{"status":"1","data":{"result":"true","code":"1","transfer_url":"https://surl.amap.com/1rXM9G4cgrQ","message":"Successful.","value":"1rXM9G4cgrQ","version":"1.0","timestamp":"1603851786847"}}
获取其中的transfer_url即分享地址 https://surl.amap.com/1rXM9G4cgrQ