android - 使用 Google Places API Android 使用 Sqlite 数据库获取最近的地点

标签 android sqlite

我是 Google 地方 API 的新手。我见过很多例子,它们显示了给定半径的结果。我在 sqlite 数据库中有 Lang 和 Lat 值现在我想在最近的地方搜索我当前位置的给定地址。任何人都可以指导我完成这个吗?

很少有stackoverflow问题与此有关,并给出了公式的解决方案。

Query to get records based on Radius in SQLite?
Google Maps API, retrieving nearest places

谁能给我演示示例的链接?

最佳答案

采用:

https://maps.googleapis.com/maps/api/place/search/json?location=lat,lng&radius=RADIUS&types=TYPES&sensor=false&key=KEY

在哪里:
lat - 你的纬度
lng - 你的经度
RADIUS - 以米为单位的半径
TYPES - 放置类型(如果多于一个,用'|'分隔)
KEY - 你的 api key

你可以在这里读更多关于它的内容:

https://developers.google.com/places/documentation/search

关于android - 使用 Google Places API Android 使用 Sqlite 数据库获取最近的地点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18611496/

相关文章:

android - 将度/分/秒转换为有效的 EXIF 接口(interface)字符串

mysql - 如何从数据库中按升序获取随机商店名称和价格?

android - InputListener.touchDragged 中的鼠标坐标不一致(闪烁)

android - 从 Chrome 文件系统播放视频在 Android 上不起作用

nodejs中的Android应用程序

swift - 用于日志记录的 SQLite 跟踪

python - 使用 Python 快速插入多列到 Sqlite\Mysql

android - MAVEN:NoClassDeffFoundError

python - Python 中的 Sqlite3 模块比 Shell 中的 SELECT 慢得多

java - 从 Java 更新 sqlite 数据库