I have embedded virtual earth map in my webpage.
I have written a code to plot continous lines(called polylines) by using a loop in
JavaScript
the code doesn't plot continous lines
here is the jscript function i have written
function GetMap()
{
var lat1 = 13.05386; //starting latitude
var lon1 = 80.19887; //starting longitude
var lat2 = lat1 + 0.005; //incrementing
var lon2 = lon1 + 0.005; //
var x = 0;
var poly = new Array();
map = new VEMap('myMap');
map.LoadMap();
while(x < 5)
{
points = new Array( new VELatLong(lat1,lon1),new VELatLong(lat2,lon2));
poly[x] = new VEPolyline('1',points);
poly[x].SetWidth(3);
poly[x].SetColor(new VEColor(0,150,100,1.0));
map.AddPolyline(poly[x]);
map.SetMapView(points);
lat1 = lat2;
lon1 = lon2;
lat2 = lat2 + 0.005;
lon2 = lon2 + 0.005;
x++;
}
}
Is there any body who is working with virtual earth maps .......
help me..plz
i am new to jscript
Thanks in advance