FOD


When the VEDistanceUnit is Kilometers this is not remenbered.

Example:

<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="http://dev.virtualearth.net/mapcontrol/v4/mapcontrol.js"></script>
<script>
var map = null;

function GetMap()
{
map = new VEMap('myMap');
map.LoadMap();

map.GetRoute('EAUZE, France',
'Panjas, Gers, France',
VEDistanceUnit.Kilometers,
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.SegmentsIdea.Instruction+" -- (";
steps+=route.Itinerary.SegmentsIdea.Distance+") ";
steps+=route.Itinerary.DistanceUnit+"\n";
}
routeinfo+="Steps:\n"+steps;
alert(routeinfo);
}
</script>
</head>
<body onload="GetMap();">
<div id='myMap' style="position:relative; width:400px; height:400px;"></div>
</body>
</html>

Regards to all, David,




Re: BUG: GetRoute - VEDistanceUnit is forgotton if select placename dialog is shown.

FOD


please replace the lamp in the code sample with the three characters

open square bracket, i, close square bracket.

David






Re: BUG: GetRoute - VEDistanceUnit is forgotton if select placename dialog is shown.

Derek Chan

This is a bug in VE and hopefully will be fixed in the next release