hi,
im novice to mappoint,
i tried one task to find the route between the source and the destination,
i can able to find the route, but path is not drawn in the correct location through the route, this is
my code as follows,
<html>
<head>
<title>Driving Directions in Virtual Earth</title>
<style type="text/css" media="screen">
ul, li {margin:0;padding:0;}
ul.popMenu {
position:absolute;
margin: 0;
padding: 0px;
list-style: none;
font-family: arial;
font-size:10px;
text-align: center;
width: 100px;
/* Width of Menu Items */
border: 1px solid #ccc;
background:white;
display:none;
}
ul.popMenu li { position: relative; }
/* Styles for Menu Items */
ul.popMenu li a {
display: block;
text-decoration: none;
color: black;
padding: 1px 1px 0px 1px; }
ul.popMenu li a:hover {
background:#335EA8;
color:white; }
.msg {filter: alpha(opacity=80);opacity: .8;z-index: 3;width: 15em;height: 15em;border: solid 1px black;background: white; visibility: hidden;overflow: auto;font-family: Verdana;font-size: 75%;position: absolute;}
.cont { z-index: 3;width: 15em; height: 5em;border: solid 1px black; background: white; position: absolute;}
</style>
<script src="http://dev.virtualearth.net/mapcontrol/v4/mapcontrol.js"></script>
<script>
var map = null;
var pLat;
var pLon;
var stPoint = null;
var ePoint = null;
function OnPageLoad()
{
map = new VEMap('myMap');
map.LoadMap(new VELatLong( 19.06,81.65), 4, 'r', false);
map.SetScaleBarDistanceUnit(VEDistanceUnit.Kilometers);
map.AttachEvent("oncontextmenu", SPopupMenu);
}
function SPopupMenu(e)
{
pLat = e.view.LatLong.Latitude;
pLon = e.view.LatLong.Longitude;
var latlong = map.LatLongToPixel(new VELatLong(pLat,pLon));
var x = map.GetLeft();
var y = map.GetTop();
var menu = document.getElementById('popupmenu');
menu.style.display='block'; //Showing the menu
menu.style.left = latlong.x + x; //Positioning the menu
menu.style.top = latlong.y + y;
}
function rmPopupMenu()
{
var menu = document.getElementById('popupmenu').style.display='none';
}
function SetStart()
{
try
{
map.DeletePushpin('start');
} catch(err) {}
stPoint = new VELatLong(pLat, pLon);
var pin = new VEPushpin('start', stPoint, null, 'Start Here', 'Starting point');
map.AddPushpin(pin);
rmPopupMenu();
}
function SetEnd()
{
try
{
map.DeletePushpin('end');
} catch(err){}
ePoint = new VELatLong(pLat, pLon);
var pin = new VEPushpin('end', ePoint, null, 'pin', 'end');
map.AddPushpin(pin);
rmPopupMenu();
}
function gDir()
{
map.GetRoute(stPoint, ePoint, VEDistanceUnit.Kilometers, null, GRoute);
rmPopupMenu();
}
function GRoute(route)
{
var rtInfo ="Total distance: ";
rtInfo+= route.Itinerary.Distance+" ";
rtInfo+= route.Itinerary.DistanceUnit;
/*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;
}*/
/*rtInfo+="Steps:\n"+steps;*/
document.getElementById("mymsg").innerHTML = rtInfo;
}
</script>
</head>
<body onload="OnPageLoad();" style="OVERFLOW:hidden">
<div id="myMap" style="WIDTH:1024px;POSITION:relative;HEIGHT:768px">
</div>
<div id="menu">
<ul id="popupmenu" class="popMenu">
<li><a href="#" onclick='SetStart()'>Start</a>
<a href="#" onclick='SetEnd()'>End</a>
<a href="#" onclick='gDir()'>ShowRoute</a></li>
</ul>
<!-- <DIV id="Dt" style="WIDTH: 100px; HEIGHT: 10px"></DIV> -->
<div id="mymsg" class="cont">
</div>
<div id="Div1" class="cont">
</div>
</div>
</body>
</html>
please guide where i gone wrong...

Path drawn isn't in the route