I am trying to get the directions services working on google maps api v3. It is a webapp for smartphones where the user can get directions from where they are (GeolocationMarker) to a static (hardcoded) location defined by a lat and long. The map centres on the hard coded lat and long, and then I have an icon (gps.png) that onclick should calculate and plot the directions between the two points. I am not overly strong in javascript and this is essentially a mashup of code...can anyone see what I have done wrong and why this wont work?I am trying to get the directions services work