gpt4 book ai didi

autocomplete - Google Places API 网络服务 : how to set multiple types for Autocomplete

转载 作者:行者123 更新时间:2023-12-04 15:56:42 29 4
gpt4 key购买 nike

我在 Google Places API Web 服务中使用 Place Autocomplete,以下 API 调用工作正常:

https://maps.googleapis.com/maps/api/place/autocomplete/json?input=palo&types=(regions)&components=country:us&key=API_KEY

但我需要为 自动完成(地区)地址 ,我用这个:
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=palo&types=(regions)|address&components=country:us&key=API_KEY

它返回:

{
"predictions" : [],
"status" : "INVALID_REQUEST"
}

设置多种类型的正确方法是什么?

最佳答案

https://developers.google.com/places/supported_types

If nothing is specified, all types are returned. In general only a single type is allowed.

关于autocomplete - Google Places API 网络服务 : how to set multiple types for Autocomplete,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30318285/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com