如何使用Google Play服务从lat / lng获取完整地址(不使用Geocoder)

时间:2022-11-23 08:08:34

I have a position at 10.792986, 106.670004. How to get FULL address like as :

我的仓位是10.792986,106.670004。如何获得如下的完整地址:

207 Lê Văn Sỹ, 14, Phú Nhuận Hồ Chí Minh, Vietnam

207LêVănSỹ,14,PhúNhuậnHồChíMinh,越南

If using Geocoder, I couldn't get Full Adress.

如果使用Geocoder,我无法获得Full Adress。

List<Address> addresses = null;
        String addressText="";

        try {
            addresses = geocoder.getFromLocation(latitude, longitude,1);
        } catch (IOException e) {
            e.printStackTrace();
        }

So, is there any way to use Gooogle Play Service ( ex: GoogleApiClient) to get full address from lat /lng Or get placeId from lat/lng.

那么,有没有办法使用Gooogle Play服务(例如:GoogleApiClient)从lat / lng获取完整地址或从lat / lng获取placeId。

I mean, what is Android Api class for Reverse Geocoding for a Latitude/Longitude

我的意思是,针对纬度/经度的反向地理编码的Android Api类是什么

1 个解决方案

#1


Have you try with googleapis.com, geocode get location from lat an lng

您是否尝试使用googleapis.com,geocode从lat和lng获取位置

simply try to pass your lat and long to the following query string, and you will get a json array, fetch your city from there

只需尝试将你的lat和long传递给下面的查询字符串,你就会得到一个json数组,从那里获取你的城市

http://maps.googleapis.com/maps/api/geocode/json?latlng=10.792986,106.670004&sensor=true

#1


Have you try with googleapis.com, geocode get location from lat an lng

您是否尝试使用googleapis.com,geocode从lat和lng获取位置

simply try to pass your lat and long to the following query string, and you will get a json array, fetch your city from there

只需尝试将你的lat和long传递给下面的查询字符串,你就会得到一个json数组,从那里获取你的城市

http://maps.googleapis.com/maps/api/geocode/json?latlng=10.792986,106.670004&sensor=true