我已经在https://docs.microsoft.com/en-gb/rest/api/maps/search/getsearchaddress实现了 Azure Maps 搜索,但我想获取仅包含某些“类型”的列表。在下面的结果中,类型是“Street”,但我只想返回类型匹配“MunicipalitySubdivision”的那些。
如果我调用此服务,API 默认返回 10 个块的结果(可以增加到 200 个),并提供一个 TotalResults 字段。通过在 API 中提供结果偏移 startIndex 参数,可以一次迭代(例如)50,000 个结果 200,但这似乎不是只返回一种类型的结果的最有效方法。
任何人都可以提出任何建议吗?
{
"type": "Street",
"id": "GB/STR/p0/1199538",
"score": 5.07232,
"address": {
"streetName": "Hampton Road",
"municipalitySubdivision": "Birmingham, Aston",
"municipality": "Birmingham",
"countrySecondarySubdivision": "West Midlands",
"countrySubdivision": "ENG",
"postalCode": "B6",
"extendedPostalCode": "B6 6AB,B6 6AE,B6 6AN,B6 6AS",
"countryCode": "GB",
"country": "United Kingdom",
"countryCodeISO3": "GBR",
"freeformAddress": "Hampton Road, Birmingham",
"countrySubdivisionName": "England"
},
"position": {
"lat": 52.50665,
"lon": -1.90082
},
"viewport": {
"topLeftPoint": {
"lat": 52.50508,
"lon": -1.90015
},
"btmRightPoint": {
"lat": 52.50804,
"lon": -1.90139
}
}
}