Using map point web services in virtual earth
To create the file and to create the initial C# you have to right click on MWSFind and then you have to select Generic Handler and then insert MWSFindHandler.ashx. Once we have got our basic handler there is necessary of modifying the Process Request method to fulfill our needs. We have to decide which Find method is being called, we have to check parameters, we have to create our MWSFindGenerator class and then getting our data and then writing it back to requesting page.
A comma-delimited string is sent by FindByID function of front-end component for representing the collections, due to which the middle component needs a function for converting this string into an integer collection for sending it to the MapPoint Web service. And this task is completed by making use of ParseInValues method.
Now we will talk about back end model component. The back end component is an ASPX page which includes C# methods for every find method of front end component. All find methods of front end component includes a semi-colon separated sequence consists of calls for Add Pin. For working this we have to follow certain steps which are given below:
Creating a web reference for Map point web service
Creating an example of map Point Find proxy
Creating an example of Map Point Route proxy
Issuing a call for suitable Map Point Find method
pTo create a reference for Map point Web service you have to right click on MWSFind and then you have to select Add web reference. After this click on GO tab and then set the web reference name for MapPointService. Now click on Add reference and then save your work. After completing this process you can access MWX proxy classes.
The code behind file should contain some methods for performing map point work. These methods include a FindNearBy method, a FindNearRoute method, a FindByID method and a FindByproperty method. FindNearBy method is called with a longitude, latitude, custom datasource name, and search radius and entity type name. This method performs some actions, which are given below
Creating a FIndNearbySpecification object
Defining a datasource
Setting latitude and longitude
Executing a FindNearBy call by making use of specified values
Parses the results
A FindByproperty method is called with an entity type name, an expression, a custom datasource name and parameters. This method also performs some actions which are given below:
Creating a FindByproperty Specification object
Defining a datasource
Filters the results for showing results which match the expression
Filters the results for showing results which match with entity type name
Executing a FindByproperty call by making use of specified values
Parses the results
FindByID method is called with an entity type name, an integer collection of entity IDs and a custom datasource name. This method perform some actions which are given below
Creating a FindID specification object
Defining a datasource
Filters the results for only showing results which match with entity type name
Specifying the entity IDs
Executing a FindByID method call by making use of specified values
Parses the results
Technorati Tags: Microsoft, virtual earth, features virtual earth, using virtual earth,
Tags: Microsoft Virtual Earth
























