This is what I have so far:
<script type="text/javascript">
var map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(40.24094684233547, -75.28080940246582), 14);
map.setUIToDefault();

GEvent.addListener(map, "click", function() {
//point creation

var bounds = map.getBounds();
var southWest = bounds.getSouthWest();
var northEast = bounds.getNorthEast();
var lngSpan = northEast.lng() - southWest.lng();
var latSpan = northEast.lat() - southWest.lat();
for (var i = 0; i < 2; i++) {
 var point = new GLatLng(southWest.lat() + latSpan * Math.random(),
 southWest.lng() + lngSpan * Math.random());
map.addOverlay(new GMarker(point));

} //end of point creation
//start of Directions

});



</script>

I have a loop to randomly generate 2 GMarker points, and I want to
generate directions between these two points. Is there anyway I can do
this? If not, what can I do to get directions between 2 randomly
generated points?

--~--~---------~--~----~------------~-------~--~----~
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