小程序切换地图位置

moveToLocation: function () {

var that = this;

wx.chooseLocation({

success: function (res) {

let mobileLocation = {

longitude: res.longitude,

latitude: res.latitude,

address: res.address,

};

that.setData({

mobileLocation: mobileLocation,

});

},

fail: function (err) { console.log(err) }

});

}

猜你喜欢

转载自blog.csdn.net/woniudelvtu/article/details/83538103