Hi!
I'm working in local, so I can't report the link of my code. I try to
search in other post, but I don't find what I'm searching for.

I'm working with GDirections and I want to show two or more
GDirections in the same map. I create two instance of GDirections (say
gdir1 and gdir2) and I able to get the result, but the zoom is set to
show only the last (dir2).

The code of this part is

dir1.load("from: " + document.myForm.saddr.value + " to: " +
gpoints[departureIndex].lat() + "," + gpoints[departureIndex].lng());
dir2.load("from: " + gpoints[destIndex].lat() + "," +
gpoints[destIndex].lng()+ " to: " + document.myForm.daddr.value);

I get the first GDirections' departure address from Form and the
destination address from gpoints array. For second GDirections, it is
vice versa. I try to use map.setCenter() after dir2.load() but it
don't work.

I don't understand if there's other way to set the zoom to view both
polylines (however both textual directions are shown).

Thanks in advance,
Francesco


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