我已经构建了Vue网络应用程序,并使用'vue-browser-geolocation'插件获得了用户坐标,有了该坐标,我如何获得城市名称或街道名称,
this.$getLocation(options)
.then(coordinates => {
console.log(coordinates);
});
从上面的代码中,我可以使用lat和long格式
as explained in detail on google APIs documentation:
https://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&key=YOUR_API_KEY