Finding information with virtual earth
By using callbacks you are free for doing anything with you’re the results. But if you want to make use of callbacks then you have to perform two tasks which are given below.
First you have to set up this callback method and remember that your method must accept four parameters such as a list of place results, a Boolean which indicates whether the more results are available or not, a list of search results and the shape lawyer.
The second task is you have to make use of a find call, which references the callback. The find method includes lot of parameters, which affect the search. As the last parameter helps to define the callback, you must check if the default values are what you wish for all intermediate parameters and if it is correct then you can make use of nulls for everything excluding first parameter and second parameter.
There are lots of options for find command while making use of callback which are described below
Type: The supported find type is VEFindType.Business. Until this kind of method gives support to many types, you are able to leave the field as null that point pot “search all types”. Microsoft inserts lots of search types like park and school therefore; type field allows you to select the category of result that you want to search out.
Show results: This flag points out that whether the pushpins will be displayed for result set. And when you want to design your own pushpins then you should make use of a list instead of using pushpins. You can link your search result display with other user control.
Create results: Create results and show results have same functions except create results determines that whether pushpin shapes are created or not. By setting this to false you can get the information of your search results but the problem is that pushpin objects are not created automatically. For using custom pushpins, you have to put your results in the list and then make use of results in other fashion programmatically. Even if you will set this parameter as true, it does not cause any harm only it will make use of client side memory and additional bandwidth.
setBetMapView: If you want to display the default pushpins then you have to set this parameter as true as it forces the map to re-center and zoom to the” best fit” view for results. And if you are not displaying the results as pushpins then you have to set this parameter to false.
UseDefaultDisambiguation: If you will set this parameter to true then your user should select a suitable choice from the default disambiguation box before your callback is fired. And when you set this parameter to false then the results are returned by virtual earth API according to first possible choice. there is storage of where values in the 3rd parameter of our callback, due to which your first check related to callback must be to decide whether the search was unique or not. And if you think search was not unique then you can display the custom list of disambiguation choices.
Technorati Tags: Microsoft virtual earth, features of virtual earth, using virtual earth,
Tags: Other Satellite Programs
























