【问题标题】:Foursquare venue search / Google Maps searchFoursquare 场地搜索/谷歌地图搜索
【发布时间】:2011-02-14 10:38:19
【问题描述】:

我正在尝试为 Foursquare 实施场地搜索。我希望用户输入城市、城市内的街道或特定场所(例如“伦敦电影院”),以便列出该地点周围的所有场所。 问题是,foursquare API 需要一个“ll”属性,其中给出了用户的纬度和经度。然后在这个位置周围显示场地。

https://api.foursquare.com/v2/venues/search?ll=40.7,-74

有一个“查询”属性可以应用为可选,其中包括围绕“ll”属性的场所的搜索词。问题是,我没有用户的位置。我希望用户在谷歌地图中输入城市和/或地点。 那是,顺便说一句,我的第二个想法。通过 Google 地图地理编码器搜索场地,然后使用此纬度/经度值调用foursquare。

geocoder.geocode( { 'address': 'london trafalgar square'}, function(results, status) {
      if (status == google.maps.GeocoderStatus.OK) {
            // here, call the foursquare api
            // in results[0].geometry.location the location of the first location is stored
      }
});

我想知道是否有更好更快的方法,这样我就不必先调用谷歌地图,而是将值发送到foursquare然后获取结果。

希望有人可以帮助我!

谢谢, 晚礼服

【问题讨论】:

    标签: javascript api google-maps foursquare


    【解决方案1】:

    我看到http://www.4sqmap.com/search 使用与您描述的类似的方法。其文本“位置”被转换为 GPS 位置以进行四方场地搜索。似乎是通过 Google Maps API 完成的。

    似乎没有更好的选择。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-10-29
      相关资源
      最近更新 更多