2

I am currently trying to have a feature similar to the local scout (search button -> proximity) in my Windows Phone 7 app.

I'd like to get the 10 top restaurants or bars/clubs near my current location. Getting the geolocation of the user is the easy part.

Now I'd like to pass this location to an API and get the results.

I tried Bing Search API but I didn't figure out how to get special locations such as restaurants. And the SOAP service connection wasn't working from my phone.

Then I searched from others API... it seems that Google or Yahoo (PlaceFinder) or maybe Foursquare can be used too. But before investigating further, do you have any ideas of a simply solution to implement the local scout from Bing ?

Or is there another way to implement this feature ?

Oh, and I am french but not specially targeting a market so I'd like to use an international service.

Thanks a lot.

Damien

EDIT :

I guess I found a part of my solution : Get business type/industry from Bing Phonebook API

As I want to use the Bing Search WSDL, I added a service reference to http://api.search.live.net/soap.asmx?AppId=42 (where 42 is my app key).

When I execute (from my phone) a simple test :

    public void Test()
    {
        BingPortTypeClient bing = new BingPortTypeClient();
        SearchRequest request = new SearchRequest();
        request.AppId = AppId; 
        request.Sources = new SourceType[] { SourceType.Web };
        request.Query = "restaurant";

        bing.SearchCompleted += new EventHandler<SearchCompletedEventArgs>(bing_SearchCompleted);
        bing.SearchAsync(request);
   }

   void bing_SearchCompleted(object sender, SearchCompletedEventArgs e)
   {

   }

I am getting the following exception :

There was no endpoint listening at http://api.search.live.net/soap.asmx that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

Inner : The remote server returned an error: NotFound.

I thought using this API would be quite more easy and well-documented...

Community
  • 1
  • 1
Valryon
  • 368
  • 2
  • 11
  • Here's similar request that has been fixed by... using Google API. It's a bit sad, but I'll have a look. http://stackoverflow.com/questions/4378800/get-list-of-local-businesses-using-bing-maps-search-service-api – Valryon Apr 30 '12 at 14:15
  • If you are going to use a Bing search API you might want to consider using the Microsoft.Phone.Tasks.SearchTask instead, it should be more straightforward. – Paul Diston Apr 30 '12 at 14:16
  • @paul-diston Yes it would be definitely easier but it won't fit my request. I need to get the results in my app and to be able to manipulate them in my code. – Valryon Apr 30 '12 at 14:36

0 Answers0