I am developing a Windows Phone 7 Silverlight application that currently displays a map that show's the user where they are by getting the coordinates from location services. I can get an address using bing Reverse geocoding API.
I would like to display local businesses to the user that may be off interest by placing pushpins on the map. However I'm not able to get any search results from the Search Service API. Whatever I enter I get 0 results and I find the documentation lacking. I've tried following this example but very little description is given of the filter parameters for example.
What I currently have:
StructuredSearchQuery query = new StructuredSearchQuery();
query.Keyword = "Petrol Station";
query.Location = "New Road, Belper DE56 1";
searchRequest.SearchOptions = new SearchOptions();
searchRequest.SearchOptions.Filters =
new FilterExpression()
{
PropertyId = 1,
CompareOperator = CompareOperator.Equals,
FilterValue = 11199
};
SearchServiceClient searchServiceClient = new SearchServiceClient();
searchServiceClient.SearchCompleted += new EventHandler<SearchCompletedEventArgs>(searchServiceClient_SearchCompleted);
searchServiceClient.SearchAsync(searchRequest);
void searchServiceClient_SearchCompleted(object sender, SearchCompletedEventArgs e)
{
SearchResponse searchResponse = e.Result;
}
I would prefer to use the exact location in the search using the coordinates I've obtained but can't see how. As far as I can tell my search should be returning all businesses in the category of 11199 (Bars and Taverns) but whatever location I enter I get 0 results.
Any Ideas?