uniapp开发小程序之获取当前位置经纬度

onLoad() {
	var _self = this;
	uni.getLocation({
	    type: 'wgs84',
	    success: function (res) {
			_self.lng = res.longitude || "";
			_self.lat = res.latitude || "";
	    }
	});
}

猜你喜欢

转载自blog.csdn.net/weixin_36185028/article/details/104920501