uniapp获取当前经纬度 地图 支持搜索 uniapp获取当前经纬度 uni.getLocation({ type: 'wgs84', geocode:true,//设置该参数为true可直接获取经纬度及城市信息 success:res=> { console.log('当前位置的经度:' + res.longitude); console.log('当前位置的纬度:' + res.latitude); }, fail: function () { uni.showToast({