如何从经纬度获取Vue Web应用程序的经纬度城市名称或街道地址?

问题描述 投票:0回答:1

我已经构建了Vue网络应用程序,并使用'vue-browser-geolocation'插件获得了用户坐标,有了该坐标,我如何获得城市名称或街道名称,

this.$getLocation(options)
  .then(coordinates => {
    console.log(coordinates);
  });

从上面的代码中,我可以使用lat和long格式

javascript vue.js vuejs2 geolocation google-location-services
1个回答
1
投票

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
© www.soinside.com 2019 - 2024. All rights reserved.