android - Geocoder.getFromLocationName() 在带有 Google Maps V2 的 Android 4 上抛出 "Service not available"异常

标签 android geocoding google-maps-android-api-2

方法 Geocoder.getFromLocationName() 在 Android 4.1 上抛出异常 Service not available,即使 GooglePlayServicesUtil.isGooglePlayServicesAvailable() 返回 SUCCESSGeocoder.isPresent() 返回 true
在新的 Google Maps v2 API 中是否有任何关于地理编码的官方示例?

最佳答案

Geocoder 与 Google Maps Android API v2 无关。

您可能想使用 Google Geocoding API直接代替 Geocoder,后者为您提供的数据量有限,并且可能会受到设备或 Android 版本特定问题的影响。

关于android - Geocoder.getFromLocationName() 在带有 Google Maps V2 的 Android 4 上抛出 "Service not available"异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16655549/

相关文章:

android - 地理编码 - GPS 坐标所需的精度?

Android Google Map V2 显示空白且仅显示缩放按钮?

java - API key 错误

java - 使所有按钮在 5 秒内不可点击

java - 类型不匹配 : cannot convert from ShelvesActivity to Fragment

web-services - 如何以编程方式(合法地)获取街道地址的经度和纬度

android - 在 Google Maps Android API v2 中显示使用 Canvas 制作的 GroundOverlay 的应用程序崩溃

android - react-native-keyboard-aware-scroll-view 中平台之间的不同行为

android - 平板电脑应用程序在方向改变时崩溃

google-maps - 与 Google Maps 相比,Google Maps Distance Matrix API 返回不同的输出