No postal code in Azure Maps search results

jbddb 1 Reputation point
2020-10-19T13:04:53.29+00:00

Hi

We are using Azure Maps to search addresses and get their geocoding but in some cases, the Azure Maps API results do not return the postal code of the address. Why ?

For example, when I search the address "route d'apremont, vineuil" with this URL :

https://atlas.microsoft.com/search/fuzzy/json?subscription-key=...&api-version=1.0&query=route d'apremont, vineuil&typeahead=true&limit=5&countrySet=FR&language=fr-FR&extendedPostalCodesFor=PAD,Str,Addr,Geo,POI,XStr&idxSet=PAD,Str

I get the following results :

{
    "summary": {
        "query": "route d apremont vineuil",
        "queryType": "NON_NEAR",
        "queryTime": 6,
        "numResults": 2,
        "offset": 0,
        "totalResults": 2,
        "fuzzyLevel": 1
    },
    "results": [
        {
            "type": "Street",
            "id": "FR/STR/p0/2634039",
            "score": 8.7185869217,
            "address": {
                "streetName": "Route d'Apremont",
                "municipality": "Vineuil-Saint-Firmin",
                "countrySecondarySubdivision": "Oise",
                "countrySubdivision": "Hauts-de-France",
                "countryCode": "FR",
                "country": "France",
                "countryCodeISO3": "FRA",
                "freeformAddress": "Route d'Apremont, Vineuil-Saint-Firmin",
                "localName": "Vineuil-Saint-Firmin"
            },
            "position": {
                "lat": 49.20664,
                "lon": 2.49526
            },
            "viewport": {
                "topLeftPoint": {
                    "lat": 49.21119,
                    "lon": 2.49403
                },
                "btmRightPoint": {
                    "lat": 49.20361,
                    "lon": 2.50088
                }
            }
        },
        {
            "type": "Street",
            "id": "FR/STR/p0/2635131",
            "score": 8.6322641373,
            "address": {
                "streetName": "Chemin d'Apremont",
                "municipality": "Vineuil-Saint-Firmin",
                "countrySecondarySubdivision": "Oise",
                "countrySubdivision": "Hauts-de-France",
                "postalCode": "60500",
                "countryCode": "FR",
                "country": "France",
                "countryCodeISO3": "FRA",
                "freeformAddress": "Chemin d'Apremont, Vineuil-Saint-Firmin, 60500",
                "localName": "Vineuil-Saint-Firmin"
            },
            "position": {
                "lat": 49.20226,
                "lon": 2.48701
            },
            "viewport": {
                "topLeftPoint": {
                    "lat": 49.20262,
                    "lon": 2.4864
                },
                "btmRightPoint": {
                    "lat": 49.20182,
                    "lon": 2.48767
                }
            }
        }
    ]
}

As you can see, maps found 2 streets. The second result has a postal code but not the first one, while both results are in the same city...

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
736 questions
{count} votes

1 answer

Sort by: Most helpful
  1. rbrundritt 18,686 Reputation points Microsoft Employee
    2020-10-19T15:50:36.657+00:00

    Postal codes are not well defined areas, but rather postal routes. The first section of road has no delivery points on it (houses, business...), and thus does not have an allocated postal codes.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.