> On May 2, 7:39 am, payal <[email protected]> wrote:

> > function getRoute()
> > {
> >         directionsPanel = document.getElementById("route");
> >         source1 =  document.getElementById("starttrip1");
> >         destination =  document.getElementById("endtrip1");
>
> >         directions = new GDirections(map, directionsPanel);
> >         directions = new GDirections(map);
> >         directions.load("from: "+source1.value+" to: "+destination.value);
>
> > }

It's not clear from what's posted why this code creates a new
GDirections object twice, assigning it to the same variable,
directions. The second time leaves out the directionsPanel variable;
this might be causing problems. But we can't tell without a map to
look at.


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