rendered paste body<!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 src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=5"></script>
<script>
var map = null;
function GetMap(start)
{
map = new VEMap('myMap');
map.LoadMap();
map.GetRoute('6th and Bell St, Edmonds, WA',
start.location.address.value,
null,
null,
onGotRoute);
}
function onGotRoute(route)
{
var routeinfo="Route info:\n\n";
routeinfo+="Total distance: ";
routeinfo+= route.Itinerary.Distance+" ";
routeinfo+= route.Itinerary.DistanceUnit+"\n";
var steps="";
var len = route.Itinerary.Segments.length;
for(var i = 0; i < len ;i++)
{
steps+=route.Itinerary.Segments[i].Instruction+" -- (";
steps+=route.Itinerary.Segments[i].Distance+") ";
steps+=route.Itinerary.DistanceUnit+"\n";
}
routeinfo+="Steps:\n"+steps;
<!-- document.write('<p>Directions:'+routeinfo+'</p>'); //-->
}
</script>
</head>
<body onload="GetMap();">
<div id='myMap' style="position:relative; width:400px; height:400px;"></div>
<form name="location" onsubmit="return GetMap(start)">
Address:<input name ="address" type="text"><br>
<input type="submit">
</form>
</body>
</html>