Find things with virtual earth
Map based searching needs a map and the ability of searching relevant information. Moreover, the good thing about virtual earth map is it provides both a map and relevant information also. By making use of virtual earth map control, we are able to build a map based search system by making use of JavaScript, CSS, and HTML. The virtual earth map control has the ability of displaying our map and it also provides four methods to perform a search. These four methods are given below.
1) On local.live.com, what or where control is available. So turn on this control by adding one line of JavaScript code.
2) You can search a location by making use of FindLocation () method. When a location match is found, you will observe that the map re-center on the location and map also zoom in to that location automatically.
3) The FindNearBy method makes a “what” search for finding businesses, which are located close to center of the map.
4) The Find () method has the power to offer you control on your search, while you can identify what and where. In JavaScript callback function, you will get the results of search.
By making use of any of the find method, you are able to build a map based search application, which includes all the features. One of the easy ways for leveraging find functionality is to turn on what and where control. When you will enter an address in the box of “where” and then click “find”, you will observe that map re-center on your location automatically. If any user types the information in the “what” box then the user will get a collection of pushpins, which will match the yellow pages search for typed information.
There are some drawbacks of using what –where control such as control is wide and therefore our map size should be 635 pixels for displaying the full control on map. We are able to adjust the style with finding the relevant CSS entries but the functionality can not be easily exposed and can not be supported also. The second drawback is the search is roughly defined it means that the user types an address in any format and best guesses are made by virtual earth. But by designing our own find control we are able to overcome these limitations.
The FindLocation Method is easy and simple to use method. In this type of method only we have to pass in a string including our address. And in FindNearBy method we have to replace the html in our search panel. We also have to change the Do Find () method. There is one more choice to perform search is by combining both FindLocation and FindNearBy searches into one search method. This kind of method provides you the great control over the results and the search process. So we can say that virtual earth map control provides you many search choices which provide you much flexibility for designing map based searches.
Technorati Tags: Microsoft virtual earth, virtual earth, using Microsoft virtual earth, features of Microsoft virtual earth,
Tags: Google Earth
























