none
API returns high confidence for a bad postal code RRS feed

  • Question

  • Hello,

    When sending this URL:

    https://dev.virtualearth.net/REST/v1/Locations?key={key}&postalCode=4622RD%20-%2020&countryRegion=NL

    The service returns the following coordinates, that appear to be in the middle of the country:

    Latitude Longitude
    52.3422584533691 5.52815723419189

    With a degree of confidence "high".

    The postal code is erroneous, of course. So why is the service returning GPS coordinates AND a high degree of confidence?

    I would expect a different behavior here.

    Best Regards,

    Nicolas


    Sephiroth84

    Thursday, February 15, 2018 3:25 PM

Answers

  • This is to be expected as "Netherlands" is a strong match for your input but up the hierarchy as a CountryRegion result. The match code for this query confirms that it is an UpHierarchy match.

    That said, I highly recommend aligning with the documented best practices here: https://msdn.microsoft.com/en-us/library/dn894107.aspx In this case use a single string query rather than address parts. For example, modifying your query to "4622RD - 20, NL" result in a postal code in Amsterdam. The request URL looks like this:

    https://dev.virtualearth.net/REST/v1/Locations?q=4622RD%20-%2020%2C%20NL&key=YOUR_BING_MAPS_KEY


    [Blog] [twitter] [LinkedIn]

    Thursday, February 15, 2018 5:01 PM