MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Integrating Virtual Earth and MapPoint Web Service

This is a discussion on Integrating Virtual Earth and MapPoint Web Service within the Virtual Earth Blogs forums, part of the Blogs category; The Virtual Earth Platform contains actually 2 services. Virtual Earth (VE) itself and the MapPoint Web Service (MWS). As a ...


Go Back   MapPoint Forums > Blogs > Virtual Earth Blogs

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  2 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 03-30-2008
Member
Green Belt
 
Join Date: Sep 2007
Posts: 50
Integrating Virtual Earth and MapPoint Web Service

The Virtual Earth Platform contains actually 2 services. Virtual Earth (VE) itself and the MapPoint Web Service (MWS). As a customer you have access to both services and if you just want to evaluate the MapPoint Web Service you can request an evaluation-account here.

While Virtual Earth is implemented through an AJAX-control you can access the MapPoint Web Service through a SOAP-API. In general there are not many reasons why you would want to use MapPoint Web Service in the presentation layer. One of the exceptions might be the LineDrive map-style for driving directions which removes the complexity of the map and shows just the relevant pieces of the route.



However, in the business layer and the backend MapPoint Web Service has still a few advantages such as:

  • batch geocoding,
  • reverse geocoding and
  • a point of interest database.

While Virtual Earth has business listings available in some countries, MapPoint Web Service has point of interest databases for the North American and the European market. These POI data sources are organized hierarchically, e.g.:



If you are interested for example in airports you can distinguish between minor airfields and major airports or you can get them all with one call. To do so you determine the Entity-name in the POI-table which is linked above, e.g. SIC4581 for major airports, SIC4580 for airfields or SICMaj45 if you want them all. Even when you get them all you can retrieve the Entity-Type from the results to set different icons (e.g. myResults.Results(j).FoundLocation.Entity.TypeName ).

The limitation is that the search-radius may not be bigger than 400 km or 250 miles. Additionally you have to consider that MWS uses a search-radius while Virtual Earth (VE) has a rectangle mapview. To determine the search-radius you can retrieve the latitude and longitude from the upper-left corner and the centre-point in VE and pass them as parameter through an AJAX-call to a web handler which in turn calls MWS. In MWS we have a function which allows you to calculate distances between 2 or more pairs of latitudes and longitudes.

Lets have a look at the process:



  • When the user opens the page in his browser
    • He retrieves the website itself* from your server (1a) ...
    • ...and since you reference the Virtual Earth MapControl in the head of the HTML-document, it retrieves the MapControl and the tiles directly from the Microsoft data centres (1b).
  • If you want to display the a POI-category you execute an AJAX-call to a web handler or web service on your web server. As parameters we send the latitude and longitudes of the upper-left corner and the centre-point of the map...



    ...as well as the category of the POI we want to display (2a). The web handler will fetch the URL parameters and uses the latitudes and longitudes of the 2 points in a SOAP-call to the MWS in order to calculate the search-radius (2b). With the result it creates another SOAP-call to the FindServiceSoap and retrieves the POI in the area 2c). The result will be processed with a string builder and returned as JavaScript to the AJAX-call which is still waiting for the response (2a). Once the result is received it will be executed using the JavaScript eval-function.

Below you will find a sample application.

This application uses a couple of your categories and adjusts the search-result whenever you pan or zoom the map.

If you haven’t done so yet, you need to request a MWS developer account. To do so you will need a Windows Live ID. This account can later be converted into a production account. Once you have the credentials enter them in the web handler CallMWS.ashx

'Set up the web service
Dim myCredentials As New NetworkCredential("YOUR ID", "YOUR PWD")

The SDK for the MWS is available online here and available for download here. If you are using Java or PHP you may want to have a look at the MapPoint Multi-Platform Assistance. Centre.




Click here to view the article.

Last edited by Eric Frost; 03-30-2008 at 07:47 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/integrating-virtual-earth-mappoint-web-service-7390.html

Posted By For Type Date
Integrating Virtual Earth and MapPoint Web Service - MapPoint Forums This thread Refback 04-03-2008 08:37 AM
The Magazine for MapPoint - MP2K Magazine This thread Refback 03-30-2008 08:39 AM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Virtual Earth & SQL Server 2008 - Part 4: Integrating SQL Server 2008 and Virtual Earth (6/6) Johannes Kebeck's Blog Virtual Earth Blogs 0 03-22-2008 08:13 AM
Virtual Earth & SQL Server 2008 - Part 4: Integrating SQL Server 2008 and Virtual Earth (4/6) Johannes Kebeck's Blog Virtual Earth Blogs 0 03-03-2008 12:51 PM
Virtual Earth & SQL Server 2008 - Part 4: Integrating SQL Server 2008 and Virtual Earth (2/6) Johannes Kebeck's Blog Virtual Earth Blogs 0 03-02-2008 03:52 PM
Integrating Microsoft Virtual Earth Maps into a Sharepoint Site VE For Government Virtual Earth Blogs 0 01-08-2008 03:11 PM
Difference between Virtual Earth and MapPoint Web Service Eric Frost News and Announcements 0 10-29-2006 08:00 AM


All times are GMT -5. The time now is 11:55 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5
MP2K Magazine
Visitor Map

Ski Deals
Book first-rate ski holidays from the leading travel brands at exceptionally competitive prices. Check out the latest range of ski deal online at Holiday Hypermarket.

Portugal Holidays
Find and book Portugal Holidays with Travel Counsellors. Holiday destinations around the world including Portugal.

Holiday Cuba
Most of all though, you will remember your Holiday in Cuba for the people. Naturally open and friendly with the warmest welcome in the Caribbean. Book at dealchecker.co.uk today.

All Inclusive Maldives
Visit The Holiday Place.co.uk for great deals on all inclusive holidays to the Maldives. Book a holiday to the outstandingly beautiful Maldives.

Balearics
Before booking to the Balearics Islands make sure you check out our travel guide online. The Balearics are renowned for their vibrant nightlife but there are also some stunning Gothic cathedrals, Stone Age ruins and fishing villages.

Inclusive late deals
For inclusive late deals, check out your options at Travel.co.uk and have fun!

Holidays to Cyprus
Take the plunge into a world of summer splendour! Find information on holidays to Cyprus online, only at On The Beach.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47