Android Geocoder getFromLocation返回有效位置的0结果

时间:2014-06-26 13:08:12

标签: android google-maps google-geocoder

下面的代码片段适用于大多数纬度/经度坐标。 但是,传递特定坐标不会返回任何结果。

Geocoder geocoder = new Geocoder(HappyApp.instance(), Locale.getDefault());
Log.w(TAG, "geocoder object created and is present: " + Geocoder.isPresent());
List<Address> addresses = geocoder.getFromLocation(32.0923805, 35.165159, 1);
Log.w(TAG, "List size: " + addresses.size());

Geocoder.isPresent()返回true。 列表大小为0。 可以通过在Google地图中输入Ari&el;来确认位置。 加沙也是如此(只是加沙而不是地带)。

我的问题是Android API / Google地图存在问题,还是我做错了什么? 谢谢。

2 个答案:

答案 0 :(得分:0)

似乎谷歌避免提供国家和其他数据,其中该地区存在争议性争议,如北塞浦路斯和加沙地带。

每当我们得到0结果时,我们都会使用以下在线服务:http://www.geonames.org

答案 1 :(得分:0)

Google地图地理编码器并非在全球所有地区都可用。 如果相同的应用程序适用于除特定区域(特别是非洲和中东)之外的其他区域,那只是因为该区域并非真正由地理编码器覆盖。

:(

相关问题