Drawing Routes with the VE Web Service

The Virtual Earth web services are fairly new and as such it does not currently have all the capabilities of it’s JavaScript counter part. One key functionality that is not currently available is the ability to draw routes on a map image. This can be done by extending the methods described in the article "VE Imagery Service Polygons and Polylines" found here: http://rbrundritt.spaces.live.com/blog/cns!E7DBA9A4BFD458C5!497.entry 

In order to display a route on a map image the following steps will have to be taken:

1) Geocode the start and end points of the route using the Geocoding service.

2) Calculate a Route and have the route geometry returned using the Routing Service.

3) Calculate the best map view for the route path.

4) Request map image from the imagery service that matches the best map view calculated in step 3.

5) Draw the route line on the map image using .NET drawing tools.

6) Draw the route turn points on the map image using .NET drawing tools.

Below is an example of a route that was created using the above method. Complete sample code can be found here:

http://cid-e7dba9a4bfd458c5.skydrive.live.com/self.aspx/VE%20Sample%20code/VERouteImageryService.zip 

image

About these ads

One thought on “Drawing Routes with the VE Web Service

  1. Pingback: WinRT XAML – Capturing a Bing Maps Image - Sonoma Partners Microsoft Dynamics CRM Blog - Microsoft Dynamics CRM - Microsoft Dynamics Community

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s