【问题标题】:placeId not working as request parameter for Places Details searchplaceId 不能作为地方详细信息搜索的请求参数
【发布时间】:2014-08-20 23:59:19
【问题描述】:

我知道他们只是弃用了 id 和 reference,而且我在最初的搜索中得到了有效的 placeId——但由于某种原因,当我去搜索这样的详细信息时:

function(place_id){

    var request = {
        placeId: place_id
    }

    this.service.getDetails(request, function(data){
        //Da callback
    });
}

询问已弃用的字段“参考”时出现错误:

Uncaught Error: Missing parameter. You must specify reference.

感谢您的帮助!

【问题讨论】:

    标签: javascript google-maps-api-3 google-places-api


    【解决方案1】:

    这取决于使用的 API 版本。

    当前的release-version是3.16,你必须在那里使用reference

    从 3.17 开始,您可以(并且应该)使用 placeId

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-12-18
      • 1970-01-01
      • 2018-07-06
      • 2017-05-08
      • 2016-12-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多