none
Unable to retrieve correct search results RRS feed

  • Question

  • Hi,

    In my application, I am using a Bing Map in a Windows Store (8.1) application. I want to display a list of matching locations when the user enters some text.

    The Uri being used to search is: Uri  locs = newUri(string.Format("http://dev.virtualearth.net/REST/v1/Locations?q={0}&key={1}",searchField, MyMap.Credentials));

    This query is not returning the whole set of locations. Eg. If I enter 'Starbucks' in the searchField, the result shows only 2 records. How can I make the query display a list of all the matching records?

    Please let me know if I am missing anything.

    Thanks in advance!

    Wednesday, May 28, 2014 4:58 AM

Answers

  • First off you are attempting to use the Geocoding service to do a point of interest search. This will not return the type of results you are looking for. It will also only return a few results as the goal of the geocoder is to find the most likely location you are searching for, not all possible locations.

    To search for points of interest you have two choices. The first is to use the public NAVTEQ POI data sources in the Bing Spatial Data Services. Take a look at chapter 6 of my free book on creating location intelligent apps for windows store apps: http://rbrundritt.wordpress.com/my-book/ I've gone into detail on this service and provide full downloadable code samples for this.

    A second method is to use the old legacy Bing Maps SOAP search service. This service has a bit more data in it but is built on an older, slower technology.


    http://rbrundritt.wordpress.com

    Wednesday, May 28, 2014 7:58 AM
  • Correct. The soap services support the type of search you are looking for.

    http://rbrundritt.wordpress.com

    Wednesday, May 28, 2014 4:21 PM

All replies

  • First off you are attempting to use the Geocoding service to do a point of interest search. This will not return the type of results you are looking for. It will also only return a few results as the goal of the geocoder is to find the most likely location you are searching for, not all possible locations.

    To search for points of interest you have two choices. The first is to use the public NAVTEQ POI data sources in the Bing Spatial Data Services. Take a look at chapter 6 of my free book on creating location intelligent apps for windows store apps: http://rbrundritt.wordpress.com/my-book/ I've gone into detail on this service and provide full downloadable code samples for this.

    A second method is to use the old legacy Bing Maps SOAP search service. This service has a bit more data in it but is built on an older, slower technology.


    http://rbrundritt.wordpress.com

    Wednesday, May 28, 2014 7:58 AM
  • Hi,

    Thanks for replying!

    In this approach, the search is based on EntityTypeId. But in my application, the Entity type is not known. Hence, it would be difficult to determine if the entered text is of type 'Restaurant', 'School', etc.

    Is there a way to do a generic search?

    Wednesday, May 28, 2014 11:41 AM
  • Correct. The soap services support the type of search you are looking for.

    http://rbrundritt.wordpress.com

    Wednesday, May 28, 2014 4:21 PM