如何从iOS的Google Place API获取20个以上的可能性地点

NkaBall

我想从iOS的Google Place API获取20多个可能的地点。

findPlaceLikelihoodsFromCurrentLocation(withPlaceFields:callback:) 恰好会返回附近的20个地方。

我无法指定要提取的位置和类型。

javaScript api似乎能够指定半径并获取60个位置。

Q1)有什么方法可以获取20个以上的可能性地点?

Q2)有什么方法可以获取某些类型的地方(例如,仅获取附近的20家超市)

let fields: GMSPlaceField = GMSPlaceField(rawValue: UInt(GMSPlaceField.name.rawValue) |
                                          UInt(GMSPlaceField.placeID.rawValue))!
placesClient?.findPlaceLikelihoodsFromCurrentLocation(withPlaceFields: fields, callback: {
  (placeLikelihoodList: Array<GMSPlaceLikelihood>?, error: Error?) in
  if let error = error {
    print("An error occurred: \(error.localizedDescription)")
    return
  }

  if let placeLikelihoodList = placeLikelihoodList {
    for likelihood in placeLikelihoodList {
      let place = likelihood.place
      print("Current Place name \(String(describing: place.name)) at likelihood \(likelihood.likelihood)")
      print("Current PlaceID \(String(describing: place.placeID))")
    }
  }
})
哈里

欢迎来到Stackoverflow!

ios SDK不支持获取20多个结果

解决此问题的唯一方法是切换到Web API并使用json过滤结果。在JSON响应中pagetoken,您可以附加一个字段并获取所有结果,但是,这需要多个API调用,每个API调用都具有与pagetoken上一个响应相对应的唯一属性。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

Google Place Api用于获取地点的自动完成建议

来自分类Dev

如何请求Google Place API返回地点的ID?

来自分类Dev

如何使用 Google Place API 从指定的经纬度获取地点地址

来自分类Dev

如何获得评论数Google Place API?

来自分类Dev

如何从google place detail api获取国家、城市、州名

来自分类Dev

在IOS中从Google Map Place API提取要求信息

来自分类Dev

解析Google Place API JSON

来自分类Dev

google place api图标列表

来自分类Dev

使用Google Place API获取事件

来自分类Dev

如何从 New Place SDK 中的 autocompletePredictions 中获取 Place 对象

来自分类Dev

如何使用照片参考在angularjs中获取Google Place照片

来自分类Dev

如何使用Google API在附近的地点获取20多个结果

来自分类Dev

Google Place API:无法从 google place api android 获取大陆名称

来自分类Dev

Google Place API(地方搜索器)

来自分类Dev

Google Place API在Android中显示错误

来自分类Dev

Google Place Autocomplete API调用入门

来自分类Dev

google place搜寻api和“ Listing by”文字

来自分类Dev

google-place-api返回null json

来自分类Dev

google place搜寻api和“ Listing by”文字

来自分类Dev

Google Place API限制-非使用限制

来自分类Dev

如何通过Google JavaScript API获取知道place_id的位置坐标

来自分类Dev

iOS Swift-Google Place API(Web)以奇怪的格式返回JSON

来自分类Dev

Google Map API-Infowindow显示Google Place API信息

来自分类Dev

Google Map API-Infowindow显示Google Place API信息

来自分类Dev

为什么在 Google API 中尝试使用 iOS 版 Place Autocomplete 时只得到 5 个结果而不是更多?

来自分类Dev

Google Places API网络服务(PHP):如何获取给定“ place_id”的“ administrative_area_2 place_id”

来自分类Dev

在Android上的Google LatLngBounds中搜索Google Place API

来自分类Dev

如何使用多个名称词查询附近的Google Maps Place Web Service API?

来自分类Dev

如何在angularjs控制器中执行Google Place API搜索

Related 相关文章

  1. 1

    Google Place Api用于获取地点的自动完成建议

  2. 2

    如何请求Google Place API返回地点的ID?

  3. 3

    如何使用 Google Place API 从指定的经纬度获取地点地址

  4. 4

    如何获得评论数Google Place API?

  5. 5

    如何从google place detail api获取国家、城市、州名

  6. 6

    在IOS中从Google Map Place API提取要求信息

  7. 7

    解析Google Place API JSON

  8. 8

    google place api图标列表

  9. 9

    使用Google Place API获取事件

  10. 10

    如何从 New Place SDK 中的 autocompletePredictions 中获取 Place 对象

  11. 11

    如何使用照片参考在angularjs中获取Google Place照片

  12. 12

    如何使用Google API在附近的地点获取20多个结果

  13. 13

    Google Place API:无法从 google place api android 获取大陆名称

  14. 14

    Google Place API(地方搜索器)

  15. 15

    Google Place API在Android中显示错误

  16. 16

    Google Place Autocomplete API调用入门

  17. 17

    google place搜寻api和“ Listing by”文字

  18. 18

    google-place-api返回null json

  19. 19

    google place搜寻api和“ Listing by”文字

  20. 20

    Google Place API限制-非使用限制

  21. 21

    如何通过Google JavaScript API获取知道place_id的位置坐标

  22. 22

    iOS Swift-Google Place API(Web)以奇怪的格式返回JSON

  23. 23

    Google Map API-Infowindow显示Google Place API信息

  24. 24

    Google Map API-Infowindow显示Google Place API信息

  25. 25

    为什么在 Google API 中尝试使用 iOS 版 Place Autocomplete 时只得到 5 个结果而不是更多?

  26. 26

    Google Places API网络服务(PHP):如何获取给定“ place_id”的“ administrative_area_2 place_id”

  27. 27

    在Android上的Google LatLngBounds中搜索Google Place API

  28. 28

    如何使用多个名称词查询附近的Google Maps Place Web Service API?

  29. 29

    如何在angularjs控制器中执行Google Place API搜索

热门标签

归档