HERE autosuggest 获取完整的地址信息

HERE autosuggest get complete address informations

我目前正在使用 HERE API,使用自动提示来获取我的结果。 在每个响应的地址对象中,我只得到如下所示的“标签”:

"address": { "label": "Resort Mark Brandenburg, An der Seepromenade 20, 16816 Neuruppin, Germany" },

有没有办法像 discoverautocomplete 那样获得完整的信息? 比如在地址对象中包含国家代码、城市、街道?

在这个页面 https://developer.here.com/documentation/geocoding-search-api/api-reference-swagger.html 的自动建议菜单中,我们可以看到响应样本中的所有信息。

我现在正在使用这个查询:

https://autosuggest.search.hereapi.com/v1/autosuggest?apiKey=MYAPIKEY&result_types=address,place&in=bbox:0.5833,42.9667,2.241295,44.210550&in=countryCode:FRA&q=apitol&limit=5&content-type=application/json&lang=fr-fr

添加此参数“&show=details”以显示地址详细信息。

如果要在响应中呈现一些额外的字段,那么您必须在请求查询字符串中传递“show”标签。请注意,某些字段涉及额外的网络服务调用,可能会增加整体响应时间。

下面 API 规范中介绍了有关“显示”标签的更多详细信息。

https://developer.here.com/documentation/geocoding-search-api/api-reference-swagger.html

示例请求查询。

https://autosuggest.search.hereapi.com/v1/autosuggest?apiKey=YOUR_API_KEY&result_types=address,place&in=bbox:0.5833,42.9667,2.241295,44.210550&in=countryCode:FRA&q=apitol&limit=5&content-type=application/json&lang=fr-fr&show=details