Chris Pietschmann

husband, father, hacker, entrepreneur, futurist, innovator, autodidact

NAVIGATION - SEARCH

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.

blog comments powered by Disqus