官方文档:https://uniapp.dcloud.io/api/location/location.html#getlocation
将type类型换成 gcj02
uni.getLocation({
type: 'gcj02',
success: function (res) {
console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res.latitude);
}
});
官方文档:https://uniapp.dcloud.io/api/location/location.html#getlocation
将type类型换成 gcj02
uni.getLocation({
type: 'gcj02',
success: function (res) {
console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res.latitude);
}
});