Microsoft Most Valuable Professional

Chris Pietschmann

An MVP From Wisconsin



Virtual Earth 6 Bug: GetDirections breaks when Start and End Address are the same

When using the new GetDirections method to get multi-point driving directions everything works fine if the Start and End address are different. But it shows unexpected results on the map when plotting a multi-point route that has an End address the same as its Start.

Here's some sample code to reproduce this issue:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
   <head>
      <title></title>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <script type="text/javascript" src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6"></script>
      <script type="text/javascript">
         var map = null;
         function GetMap()
         {
            map = new VEMap('myMap');
            map.LoadMap();
            map.GetDirections(["Microsoft", "Everett WA", "Bellingham WA", "Microsoft"]);
         }  
      </script>
   </head>
   <body onload="GetMap();">
   <div id='myMap' style="position:relative; width:400px; height:400px;"></div>
   </body>
</html>

Here's a screenshot of the results displayed on the map:

This is the third bug in Virtual Earth 6 that I've found since it was released almost 2 weeks ago.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: Virtual Earth
Posted by crpietschmann on Sunday, October 28, 2007 12:28 AM
Permalink | Comments (0) | Post RSSRSS comment feed

Related posts

Comments are closed

About the author

I'm Chris Pietschmann, go to the About Me page to learn more about me.

Search

Sponsors

Web.Maps.VE - ASP.NET AJAX Virtual Earth Mapping Server Control

Recent comments

Disclaimer


This work is licensed under a Creative Commons Attribution 3.0 United States License, unless explicitly stated otherwise within the posted content.
© Copyright 2004 - 2008 Chris Pietschmann