none
Bing Maps Rest Service results occasionally do not match the Bing Maps (bing.com/maps) RRS feed

  • Question

  • Hello,

    We use the Bing Maps REST Services to locate addresses and retrieve Lat Long coordinates.  The 'Find Location By Query' of the Locations API is what we use.

    When the address returns incorrectly we would search on Bing.com/maps website to see if what the API returned to us is replicated.

    Occasionally we will see this happen.

    Here is an example of an issue we are seeing:

    User enters address:  605 Rio Grande Dr Toms River NJ 08755

    The API returns:  605 Rio Grande Dr, Delray, WV 26714.

    When we enter our address in Bing.com/maps it returns:  Rio Grande Dr Toms River NJ 08755 (without the street number)

    The API does not attempt to return an address in the same state (NJ in this case).

    At least bing.com/maps returned within the correct location.

    Could there be an issue with the API?

    Would anyone be able to assist?

    Thank you in advance.

    Friday, January 24, 2020 2:42 PM

All replies

  • Hello HZeller,

    There is a context given by the browser session that is likely not given in your API call.  The Website uses the culture and location parameters the browser provides to give a location context to the web page.  Also, you are using the "AutoSuggest" interface on the Bing.com/maps site rather than the full address in the API call.

    If you dig a little deeper in the docs at https://docs.microsoft.com/en-us/bingmaps/rest-services/locations/find-a-location-by-query you can see that you can indeed add a culture code.  The example uses "en-gb" to give a UK context to the call.

    Another method that also serves to restrict locale is call alignment https://docs.microsoft.com/en-us/bingmaps/rest-services/locations/find-a-location-by-address. Our sample uses Microsoft

    http://dev.virtualearth.net/REST/v1/Locations/US/WA/98052/Redmond/1%20Microsoft%20Way?o=xml&key={BingMapsKey}

    But your call would be

    http://dev.virtualearth.net/REST/v1/Locations/US/NJ/08755/Toms%20River/605%20Rio%20Grande%20Dr?o=xml&key={BingMapsKey}

    As you can see from the left to right nature of this call, it narrows the search from left to right giving order of importance to New Jersey. The issue with your call is that "605 Rio Grande" is not appearing as a valid address in NJ so with left priority it thinks that is the most important bit of info so it finds you an exact match in WV over the poor match in NJ.

    So there are lots of ways to address your address issue but it really depends on what your final user experience or Application is trying to accomplish.

    Sincerely,

    IoTGirl 


    Saturday, January 25, 2020 1:28 AM
    Owner