如何从谷歌地图中的经纬度获取地址位置.? [英] How to get address location from latitude and longitude in Google Map.?
本文介绍了如何从谷歌地图中的经纬度获取地址位置.?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以我有纬度和经度,比如 44.4647452
和 7.3553838
.我需要得到这样的地址:米兰,意大利,海峡.肯尼迪 89.
So I have latitude and longitude Like 44.4647452
and 7.3553838
. I need to get address like: Milan, Italy, str. Kennedy 89.
我该怎么做?
推荐答案
只需将纬度、经度和您的 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.3553838&key=YOUR_API_KEY
注意:在传递 latlng 参数时,确保纬度和经度值之间不存在空格.
Note: Ensure that no space exists between the latitude and longitude values when passed in the latlng parameter.
这篇关于如何从谷歌地图中的经纬度获取地址位置.?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文