【问题标题】:Google Map iOS Application Search谷歌地图 iOS 应用搜索
【发布时间】:2015-09-01 07:09:03
【问题描述】:

Google Place API 有不同的搜索 API 用于搜索地点 在下面的链接中提到:

https://developers.google.com/places/webservice/search?hl=en

我希望在我的应用程序中获得与“Google Map”iOS 应用程序完全相同的结果。

那么我应该使用哪个 API 进行搜索以及使用什么参数?

目前我正在使用这个 URL 进行搜索:

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=xxxx.xx,xxxx.xx&radius=50000&keyword=xxxxx&key=xxx

【问题讨论】:

    标签: ios google-maps search maps


    【解决方案1】:

    使用 Google Place Api 查找搜索、带有图片的 NearBY 地点 Demo 中提供了与 Google Api Search 相关的所有内容。

    我创建了一个demo,你可以得到完整的解决方案,检查一下。 可能对你有帮助。

    GooglePlacesAPIDemo

    【讨论】:

      【解决方案2】:

      这会以谷歌地图的形式返回准确的结果。但是,我已将类型设置为“ATM”,但您可以获得任何餐厅、酒吧、银行等的结果。

      // Call Google Places API as..
      NSString * strUrl = [ NSString stringWithFormat : @"https://maps.googleapis.com/maps/api/place/search /json?location = %f , %f &radius = % @ &type = atm &sensor = true & name = %@ &key = %@",latitude, longitude, radius.text,UITextField.text, googleAPI_Key ];
      

      您将获得 JSON 格式的数据。根据你的解析。 对于纬度和经度,使用 CLLocationManager 获取当前位置。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2012-10-29
        • 1970-01-01
        • 2016-02-16
        • 2015-07-01
        • 2011-09-18
        • 2013-04-10
        • 2011-02-13
        相关资源
        最近更新 更多