android - 如何从 google places API 获取所有评分最高的热门地点

标签 android google-places-api

我想从 google places API 中获取所有受欢迎的地点,这些地点按升序排序并具有最高评级。 (附近搜索休斯顿美国 lat = 29.760193 , lng = -95.36939) 这个我试过了

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=29.760193,-95.36939&rankby=prominence%20&types=food&sensor=false&key=AIzaSydfgfdgdfgdfgdfgdgdfgcDBuNWG4


note: rankby=prominence

但它给出了这样的结果

 {
   "html_attributions" : [],
   "results" : [],
   "status" : "INVALID_REQUEST"
 }

但是当 rankby=distance

时它给了我有效的输出

我哪里做错了。

我希望所有评分最高的热门地点优先。

最佳答案

我希望你做得很好,为了获得热门地点,你将调用下面的 api。

https://maps.googleapis.com/maps/api/place/search/json?keyword=coffee&location=37.787930,-122.4074990&radius=5000&sensor=false&key={YOUR_API_KEY}

For more detail you can refer this link.

关于android - 如何从 google places API 获取所有评分最高的热门地点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22032166/

相关文章:

android - SharedPreferences.getBoolean 为默认值返回 true

java - 我如何将直接从 Google Place API 获取的地址组件明智地 fork ?

Android Play Billing Library : onSkuDetailsResponse responseCode is 0, 但 skuDetailsList 的大小也是 0

android - 无法更新任何插件,不是有效的 cordova 平台?

Angular - 输入值更改时不会触发 Google 位置指令

http - 附近地点搜索请求

ios - 在 ViewController 中将 API 数据发送到 UITableView

android - 使用 Places API 时出现 "The provided API key is expired."错误

java - 如何通过JNI操作CameraPreview bytearray? (开放式简历)

android - 如何在 Visual Studio 中创建用于开发 Xamarin UI 测试的 Apk 文件?