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/