由于微信小程序的 getFuzzyLocation 误差太大
不得不改用高德微信sdk
使用方法:
一、下载 sdk
二、引入 sdk
//引入
var amapFile = require('../../libs/amap-wx.js');
Page({
onl oad: function() {
var that = this;
var myAmapFun = new amapFile.AMapWX({key:'高德Key'});
setInterval(()=>{
myAmapFun.getRegeo({
success: function(data){
//成功回调
},
fail: function(info){
//失败回调
console.log(info)
}
})
})
},
})
集体参数参考高德的回调信息:
标签:function,插件,微信,var,打卡,高德,sdk From: https://blog.csdn.net/weixin_59685936/article/details/137506559