1
Geocoder gcd = new Geocoder(this, Locale.getDefault());
            List<Address> addresses = gcd.getFromLocation(lat, lng, 100);
            StringBuilder result = new StringBuilder();
                                     if (addresses.size() > 0) {
                              Address address = addresses.get(0);
                for (int i = 0; i < address.getMaxAddressLineIndex(); i++)
                    result.append(address.getAddressLine(i)).append("\n");
                result.append(address.getLocality()).append("\n");
                result.append(address.getPostalCode()).append("\n");
                result.append(address.getCountryName()); }

我正在尝试反向地理编码并获取地址,我能够获取美国的地址,但不能获取印度的地址。知道如何破解吗?

4

0 回答 0