Hello there,

I obtain 2 addresses as user input and then want to draw a line between 
them. I use geocoding to convert the address to LatLng value. This works 
absolutely fine. But unfortunately, the line never gets drawn :(

The website is available at:
http://migrationstudy.freewebsitehosting.com/index.html
(On clicking the "Connect" button, there must be a line between the places 
mentioned in the input boxes on the left)

This is the problematic piece of code:
------------------------------------------------------------------------
var lat1 = frmLatLng.lat();
var lng1 = frmLatLng.lng();
var lat2 = toLatLng.lat();
var lng2 = toLatLng.lng();
var flightPlanCoordinates = [new google.maps.LatLng(lat1, lng1), 
 new google.maps.LatLng(lat2, lng2)]; 
var flightPath = new google.maps.Polyline({
path: flightPlanCoordinates,
strokeColor: "#FF0000",
strokeOpacity: 1.0,
strokeWeight: 2,
geodesic: true
}); 
flightPath.setMap(map);

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to