none
Bad results from REST Location by Query call RRS feed

  • Question

  • The results we are getting from a Location by Query call are not the same as you get on bing.com/maps and are much less accurate/plain wrong. All these examples are based in the UK.

    One example, a search for "Green Oak Road" - on bing.com/maps you get results for that road in Codsall, Sheffield, Watton. In the API a call to http://dev.virtualearth.net/REST/v1/Locations?q=Green+Oak+Road&c=en-GB returns 3 results, all for "Oak Road", not "Green Oak Road", in two parts of London and in Five Oak Green. These results are simply incorrect.

    Another example, a search for "Hanover Way" gives Sheffield, Leeds, Burley, Wrexham, Churchdown on bing.com/maps. In the API, a call to http://dev.virtualearth.net/REST/v1/Locations?q=hanover+way&c=en-GB returns only 4 results, for Bexley, Churchdown, Burley and Windsor. The biggest town entries for Hanover Way, in Sheffield and Leeds, are both missing from the API. Also it does not include these results even if I have a larger maxResults, there appears to be no way of getting them.

    Is there a way for the REST API to access the same results the front end map uses? Or in other ways improve the results we are getting? Adding user context parameters does not help, e.g. adding a UK bounding box makes the results slightly worse by reducing what is returned.

    <style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #eeeeee; background-color: #000000} span.s1 {font-variant-ligatures: no-common-ligatures} </style>

    Wednesday, March 14, 2018 1:06 PM

Answers

  • The developer APIs and the bing maps website are different and always be, for many reasons. However, when it comes to geocoding addresses or places (postal codes, cities...) the developer APIs are generally more accurate. Looking at your queries, here is why the developer API's aren't as accurate:

    The issue here is that you on the Bing Maps consumer site you are using the autosuggest feature which is designed to provide local suggestions based on partial inputs, and takes in things like map view, IP address and other metrics to help figure out a context for your query and limits the suggestions to those that are local to you, in this case a road name. While on the developer API side of things you are using the geocoding service which is designed to take addresses and find their location based on the global dataset, without any local context. Basically, you are using the wrong tool for this situation. If you want to use the geocoding service you should also pass in a city and country. If you use the autosuggest module in the Bing Maps V8 web control you will likely find the result you are looking for. https://www.bing.com/maps/sdkrelease/mapcontrol/isdk/autosuggestui?refig=dfe41bcc165842ce99ee0c1bfc1091b9

    You will also find that the bing maps consumer website also handles businesses, where as the geocoding service doesn't. Bing  Maps has separate API's for business listings, but their autosuggest module has business listing support coming soon (initially in the US, then expanding to other countries).


    [Blog] [twitter] [LinkedIn]


    Wednesday, March 14, 2018 3:29 PM