且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从谷歌地图中的经纬度获取地址位置.?

更新时间:2023-08-30 07:52:16

只需将纬度、经度和您的 Google API 密钥传递给以下查询字符串,您将获得一个 json 数组,从那里获取您的城市.

Simply pass latitude, longitude and your Google API Key to the following query string, you will get a json array, fetch your city from there.

https://maps.googleapis.com/maps/api/geocode/json?latlng=44.4647452,7.35538​​38&key=YOUR_API_KEY

注意:在传递 latlng 参数时,确保纬度和经度值之间不存在空格.

Note: Ensure that no space exists between the latitude and longitude values when passed in the latlng parameter.

点击此处获取 API 密钥