方法地理coder.getFromLocationName()
抛出异常服务不可用
在Android 4.1,即使 GooglePlayServicesUtil.isGooglePlayServicesAvailable()
返回成功
和地理coder.is present()
返回真
。
是否有地理编码的新的谷歌地图V2 API中的任何官方的例子吗?
The method Geocoder.getFromLocationName()
throws the exception Service not available
on Android 4.1, even if GooglePlayServicesUtil.isGooglePlayServicesAvailable()
returns SUCCESS
and Geocoder.isPresent()
returns true
.
Is there any official example for geocoding in the new Google Maps v2 API?
地理codeR
是不相关的谷歌地图Android的API V2。
Geocoder
is not related to Google Maps Android API v2.
您可能需要使用谷歌地理编码API ,而不是直接地理codeR ,它给你有限的数据量,并可能会影响设备或Android版本的具体问题。
You may want to use Google Geocoding API directly instead of Geocoder
, which gives you limited amount of data and might be affected by device or Android version specific problems.