Your code converts the original lat/lng values to radians
   var lat1 = point1.lat() * Math.PI / 180;
   var lon1 = point1.lng() * Math.PI / 180;
and performs the calculations in radians, but never converts the result
back into degrees.
   marker2.setLatLng(new GLatLng(lat2,lon2));

Try:
   lat2 = lat2 * 180 / Math.PI;
   lon2 = lon2 * 180 / Math.PI;
   marker2.setLatLng(new GLatLng(lat2,lon2));

-- 
Mike Williams
http://econym.org.uk/gmap


--

You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.


Reply via email to