获取用户当前位置周围的地点列表 [英] Get list of places surrounding user's current location

查看:42
本文介绍了获取用户当前位置周围的地点列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我在 SO 和其他论坛上看到了很多关于此的问题,但没有明确的答案.好像是这么基本的过程,不明白为什么找不到答案.

So, I've seen many questions about this here on SO and in other forums, but no definite answer. It seems like such a basic process, so I don't understand why I can't find any answers for it.

在 Android 开发者文档中 - http://developer.android.com/guide/topics/location/obtaining-user-location.html#Adjusting - 在帮助用户决定去哪里"部分的底部附近,他们举了一个例子,您希望提供附近餐馆、商店和娱乐场所的列表,并且推荐顺序会根据用户位置而变化."

In the Android Developer documentation - http://developer.android.com/guide/topics/location/obtaining-user-location.html#Adjusting - near the bottom in the section "Helping the user decide on where to go", they give the example, "you're looking to provide a list of nearby restaurants, stores, and entertainment and the order of recommendations changes depending on the user location."

这篇文章 - 查找附近位置 - 建议使用外部 API.我认为 Google 的 Android API 不包含此功能是没有意义的,尤其是考虑到他们文档中的上述情况.

This post - finding nearby locations - suggests using external APIs. It doesn't make sense to me that Google's Android API would not include this functionality, especially given the above scenario in their documentation.

其他帖子讨论了使用 GeoCoder + getFromLocationName().这似乎不正确,因为它看起来不像是搜索,而且似乎还针对特定地址.

Other posts talk about using the GeoCoder + getFromLocationName(). This doesn't seem right either seeing as how it doesn't really feel like a search and it also seems geared toward a specific address.

Android 开发人员文档中的上述示例是否可以使用当前的 Android SDK 完成?我已经在许多应用程序中看到它完成了,并且在尝试无处可去的奇怪解决方案时感到非常沮丧.请帮助我了解发生了什么.

Is the above example from the Android Developer documentation able to be done using the current Android SDK? I've seen it done in many apps and am getting very frustrated trying weird solutions that don't get anywhere. Please help me understand what's going on.

谢谢!

更新: Google Places API 不是解决这个问题的方法吗?它是一个网络服务,但它似乎完全符合我上面描述的功能?如果我在这方面做得不对,请告诉我.

UPDATE: Is Google Places API not the answer for this? It is a web service, but it seems like the it does exactly what I've described above? If I am way off on this, please let me know.

推荐答案

Google APIs Client Library for Java(用于基于 HTTP 的 API)和 Google Places API(用于 Places Data)是要走的路.

Google APIs Client Library for Java (for HTTP-based APIs) and Google Places API (for Places Data) is the way to go.

使用 Google Places API

这篇关于获取用户当前位置周围的地点列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆