my.onlocatedcomplete(object object)
建议使用 choosecitytask 的 onlocatedcomplete 方法代替 my.onlocatedcomplete
小程序开发者工具: 不支持。
主体: 企业支付宝小程序 、 个人支付宝小程序
相关文档: choosecity 、 setlocatedcity
监听地理位置定位完成事件。
该 api 仅监听 my.choosecity 入参 setlocatedcity 为 true 时的定位完成事件。
function listener
地理位置定位完成事件的监听函数
参数
object res
属性 | 类型 | 描述 |
---|---|---|
longitude | number | 当前定位城市经度 |
latitude | number | 当前定位城市纬度 |
locatedcityid | string | 当前定位城市 id |
accuracy | number | 定位精度 |
city | string | 当前定位城市名称 |
cityadcode | string | 当前定位城市行政区域编码 |
province | string | 当前定位省份名称 |
country | string | 当前定位国家名称 |
countrycode | string | 当前定位国家的数字代码 |