Hi All,

I am working with google map using vb. I want to get the direction according to latitude and longitude for that I wrote the code like bellow in vb

tt = "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN""" & vbCrLf & """http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"">" & vbCrLf & "<html xmlns=""http://www.w3.org/1999/xhtml"">" & vbCrLf & _
"<head>" & vbCrLf & "<meta http-equiv=""content-type"" content=""text/html; charset=utf-8""/>" & vbCrLf & "<title>Control Initialization</title>" & vbCrLf & _
"<script src=""http://maps.google.com/maps?file=api&amp;v=2.x&amp;key=ABQIAAAAzr2EBOXUKnm_jVnk0OJI7xSosDVG8KKPE1-m51RBrvYughuyMxQ-i1QfUnH94QxWIa6N4U6MouMmBA"" type=""text/javascript""></script>" & vbCrLf & _
"<script type=""text/javascript"">" & vbCrLf & "//<![CDATA[" & vbCrLf & "function initialize() {" & vbCrLf & "if (GBrowserIsCompatible()) {" & vbCrLf & " // define the crosshair tile layer and its required functions" & vbCrLf & _
"var crossLayer = new GTileLayer(new GCopyrightCollection(""""), 0, 15);" & vbCrLf & "crossLayer.getTileUrl = function(tile, zoom) {" & vbCrLf & " return ""./include/tile_crosshairs.png"";" & vbCrLf & "}" & vbCrLf & _
"crossLayer.isPng = function() {return true;}" & vbCrLf & "" & vbCrLf & "// Create a new map type incorporating the tile layer" & vbCrLf & "var layerTerCross = [ G_PHYSICAL_MAP.getTileLayers()[0]," & vbCrLf & _
"crossLayer ];" & vbCrLf & "var mtTerCross = new GMapType(layerTerCross," & vbCrLf & "G_PHYSICAL_MAP.getProjection(), ""Ter+"");" & vbCrLf & "" & vbCrLf & "var map = new GMap2(document.getElementById(""map_canvas"")," & vbCrLf & _
"{ size: new GSize(DesignedByArquineWidth,DesignedByArquineHeight) } );" & vbCrLf & _
"var directionsPanel = document.getElementById(""route"");" & vbCrLf & _
"var directions = new GDirections(map, directionsPanel);" & vbCrLf & _
"map.addMapType(G_PHYSICAL_MAP);" & vbCrLf & "map.addMapType(mtTerCross);"

tt = tt & " var hyd" & m1 & "= new GMarker( new GLatLng (" & CStr(dla3) & "," & CStr(dlon3) & ")" & "," & "markerOptions" & ");" & vbCrLf & _
"GEvent.addListener (hyd" & m1 & "," & " ""mouseover"" " & "," & " function() {" & vbCrLf & _
"hyd" & m1 & " .openInfoWindowHtml (" & """" & d3 & tm & """" & ");" & vbCrLf & _
"});" & vbCrLf & _
"map.addOverlay (hyd" & m1 & ");"

tt = tt & "var point1 = [new GLatLng(" & CStr(dla3) & "," & CStr(dlon3) & ")" & "," & "new GLatLng(" & CStr(lat2) & "," & CStr(lon2) & ")];" & vbCrLf & _
"var line = new GPolyline(point1" & "," & """" & hval & """" & "," & 2 & ");" & vbCrLf & _
"directions.load(" & "new GLatLng(" & CStr(dla3) & "," & CStr(dlon3) & ")" & " ," & "new GLatLng(" & CStr(lat2) & "," & CStr(lon2) & ") " & ");"

but i am not getting directions for that where should i modify code please let me know