点击按钮-位置,如何将地址详情赋值到单元格address中?帮忙改下js代码
- wx.getLocation({
- type: 'wgs84', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
- success: function (res) {
- var latitude = res.latitude; // 纬度,浮点数,范围为90 ~ -90
- var longitude = res.longitude ; // 经度,浮点数,范围为180 ~ -180。
- var speed = res.speed; // 速度,以米/每秒计
- var accuracy = res.accuracy; // 位置精度
- wx.openLocation({
- latitude: latitude, // 纬度,浮点数,范围为90 ~ -90
- longitude: longitude, // 经度,浮点数,范围为180 ~ -180。
- name: '当前位置', // 位置名
- address: '', // 地址详情说明
- scale: 28, // 地图缩放级别,整形值,范围从1~28。默认为最大
- //infoUrl: 'http://qy.grapecity.cn/huozige/' // 在查看位置界面底部显示的超链接,可点击跳转
- });
- }
- });
复制代码
|