android - Google Play 服务位置 API 和 Google map 地理编码 API 之间有什么区别

标签 android google-maps google-play-services

Google Play services location APIs 之间有什么区别和 Google Maps Geocoding API在 android 中应该首选哪个 API 来进行反向地理编码?

最佳答案

您链接的 Google map 地理编码 API 指向用于网络服务的 API,而位置 API 则用于 Android。

因此,我可以指出的唯一明显区别是它们所使用的平台。两者都在同一个服务中,即 Google map 。

对于 Android 反向地理编码(或只是地理编码),建议的方法是简单地使用 Geocoder类(class)(强调我的):

A class for handling geocoding and reverse geocoding. Geocoding is the process of transforming a street address or other description of a location into a (latitude, longitude) coordinate. Reverse geocoding is the process of transforming a (latitude, longitude) coordinate into a (partial) address. The amount of detail in a reverse geocoded location description may vary, for example one might contain the full street address of the closest building, while another might contain only a city name and postal code. The Geocoder class requires a backend service that is not included in the core android framework. The Geocoder query methods will return an empty list if there no backend service in the platform. Use the isPresent() method to determine whether a Geocoder implementation exists.

另请参阅这些可能有用的帖子:

关于android - Google Play 服务位置 API 和 Google map 地理编码 API 之间有什么区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43577183/

相关文章:

ios - swift Codable 中的 GMSPath 不符合 swift 协议(protocol)

google-maps - 谷歌地图具有多个字符的标记标签

android - list 的应用程序标签中缺少名称为 "com.google.android.gms.appstate.APP_ID"的元数据标签

android - 使用谷歌播放服务获取坐标与不使用谷歌播放服务

javascript - 谷歌地图最近的商店

android - 以编程方式启用定位模式高精度或省电,无需用户访问设置

java - 为什么使用 Json Simple API 在 java 中动态增加 json 数组大小?

android - 如何删除文件

android - 何时/如何生成 Room 架构文件?

android - 根据 Android 设备中的屏幕高度使行的高度相等