Hi @Gluten ,
The Maps Engineering team has found the root cause of this issue and is implementing a fix. It is flighting this week and should be live by sometime next week.
Sincerely, IoTGirl
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The Bing Maps REST API Locations endpoint format seems to have changed recently.
Although it doesn't appear to be documented in the API, the locality
field for an address
in the API response previously mapped to the city for an address. The neighborhood
field would list the neighborhood where available.
Now, I am seeing that the neighborhood
field is never returned, even when setting includeNeighborhood=1
in the request, and the locality
field seems to contain the neighborhood information, with no field mapping to city anymore.
This mapping of neighborhood onto the locality
field only appears to apply to US addresses from my testing, and I do not see any other way to get the city for the address response (only adminDistrict2
which maps to county in the US).
Example request:
{
"authenticationResultCode": "ValidCredentials",
"brandLogoUri": "http://dev.virtualearth.net/Branding/logo_powered_by.png",
"copyright": "Copyright © 2022 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.",
"resourceSets": [
{
"estimatedTotal": 1,
"resources": [
{
"__type": "Location:http://schemas.microsoft.com/search/local/ws/rest/v1",
"bbox": [
47.599367282429327, -122.33791786087039, 47.60709271757068,
-122.32264213912961
],
"name": "504 4th Ave, Seattle, WA 98104, United States",
"point": { "type": "Point", "coordinates": [47.60323, -122.33028] },
"address": {
"addressLine": "504 4th Ave",
"adminDistrict": "WA",
"adminDistrict2": "King Co.",
"countryRegion": "United States",
"formattedAddress": "504 4th Ave, Seattle, WA 98104, United States",
"intersection": {
"baseStreet": "4th Ave",
"secondaryStreet1": "James St",
"intersectionType": "Near",
"displayName": "4th Ave and James St"
},
"locality": "Pioneer Square",
"postalCode": "98104"
},
"confidence": "Medium",
"entityType": "Address",
"geocodePoints": [
{
"type": "Point",
"coordinates": [47.60323, -122.33028],
"calculationMethod": "Interpolation",
"usageTypes": ["Display", "Route"]
}
],
"matchCodes": ["Good"]
}
]
}
],
"statusCode": 200,
"statusDescription": "OK",
"traceId": "a669ab363dd44037a5991aec60da7b56|BN00005015|0.0.0.1"
}