Yes, I've read the documentation.  I'm able to insert an error handler
and can see that I'm getting a 604 error and by searching this forum,
it seems like its a problem with the formatting of the points in the
array.  I was hoping someone had created an array from lng lat pairs
before and could see what I was missing.

On Nov 18, 12:20 pm, "[email protected]" <[email protected]>
wrote:
> On Nov 18, 9:11 am, JWoodall <[email protected]> wrote:
>
>
>
> > I'm trying to load directions for some lat/lng points that a user
> > selects.  My map loads fine the the array is properly built for the
> > waypoints, but I don't think it is in the correct format.  Nothing
> > ends up loading in the directionsPanel and the map is not updated with
> > the directions.
>
> > This is returned by alert(dArray) after 2 points are sent to
> > buildarray:
>
> > -85.76241,38.218764,-85.68326,38.22292
>
> > I think I need it to look like this though:
>
> > "-85.76241,38.218764", "-85.68326,38.22292"
>
> > Any ideas?
>
> Did you try the 
> documentation?http://code.google.com/apis/maps/documentation/reference.html#GDirect...
>
> http://code.google.com/apis/maps/documentation/services.html#RoutesAn...
>
>   -- Larry
>
>
>
> > Short code:
>
> > var dn = 0;
> > var dArray = new Array();
> > function buildarray(lat, lng){
> >         var point1 = lat + "," + lng;
> >         dArray[dn] = point1;
> >         dn = dn + 1;
>
> > }
>
> > function displayDirections(){
> >         directions = new GDirections(map, directionsPanel);
> >         directions.loadFromWaypoints(dArray);
> >         alert(dArray);
>
> > }- Hide quoted text -
>
> > - Show quoted text -

--

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