Quantcast
Viewing all articles
Browse latest Browse all 7205

How to connect a map control to the Bing Search web service


This example demonstrates how to provide the capability to search for a specific place on a map using the Search panel. The Search panel appears automatically (since the BingSearchDataProvider.ShowSearchPanel property is set to true by default) after you connect to the Bing Search web service.

To find a location on the map, type it on the Search panel.

If the Bing Search service finds alternative places for a request, the "Show others..." option will appear in search results in the Search panel. To go back to the best search result for a place, click "Show best result.."

For example, if you search for "Paris", the "Paris, France" and "Show others..." options will be displayed in the Search panel. Note that the map pushpin shows only the "Paris" location on the map. If you select the "Show others..." option, other search results ("Paris, Lamar Co., TX", etc.) and the "Show best result.." option will be displayed. To see only "Paris, France", click "Show best result.." in the Search panel.

Note that if you run this sample as is, you will get a warning message informing that the specified Bing Maps key is invalid. To learn about how to register a Bing Maps account and create a key for it, refer to the How to: Get a Bing Maps Key tutorial.



Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>