我正在尝试仅过滤 HERE Map 的自动完成 API 中的城市。我在他们的文档上读到有matchLevel
参数......
但是,如果我包含它,什么都不会改变。
这是我的电话:
http://autocomplete.geocoder.api.here.com/6.2/suggest.json?app_id=MY_APP_ID&app_code=MY_APP_CODE&matchLevel=city&query=New York
我仍然收到非城市类型的回复。
{
"suggestions": [
{
"label": "United States, New York",
"language": "en",
"countryCode": "USA",
"locationId": "NT_rNsDLtnazM.kjVC-K6YWOA",
"address": {
"country": "United States",
"state": "New York"
},
"matchLevel": "state"
},
{
"label": "United States, New York, New York, New York",
"language": "en",
"countryCode": "USA",
"locationId": "NT_YpQcXqbaOb.I4m5EW8BHEC",
"address": {
"country": "United States",
"state": "New York",
"county": "New York",
"city": "New York",
"postalCode": "10007"
},
"matchLevel": "city"
},
{
"label": "United States, New York, New York",
"language": "en",
"countryCode": "USA",
"locationId": "NT_ABhedB4xGEL83YY5az47iD",
"address": {
"country": "United States",
"state": "New York",
"county": "New York"
},
"matchLevel": "county"
},
...
任何帮助表示赞赏。