我是 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/