微信小程序重定位不能回到坐标
本文介绍了微信小程序重定位不能回到坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
Page({
……
controltap:function(e) {
var that = this;
console.log(e.controlId)
switch(e.controlId){
case 1: break;
case 2: break;
case 3: break;
case 4:
var that = this;
// 获取定位,并把位置标示出来
app.getLocationInfo(function(locationInfo){
console.log('map',locationInfo);
that.setData({
longitude: locationInfo.longitude,
latitude: locationInfo.latitude
})
})
break;
default : break;
}
},
……
})
e.controlId 和 坐标都已经输出了,坐标还是没有回到定位的地方。
解决方案
已经解决了 有对应的moveToLocation()方法
https://mp.weixin.qq.com/debu...
这篇关于微信小程序重定位不能回到坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文