On Nov 29, 10:23 am, igloo <[EMAIL PROTECTED]> wrote:
> A quick look  - I can't see a setCenter function call which is
> necessary to actually get the map going!

The GDirections call will perform a setCenter on the map if it
completes successfully and has the map as an argument. Which is why
the map eventually shows up.

However, markers can not be added to a map which has not been
initialized.  The first error I see is here:
                map.addOverlay(new GMarker(startLl,startIcon));
which is being executed before the map is initialized.

Once that has been addressed, the next error occurs here:
dist = directions1.getDistance().meters + directions2.getDistance
().meters
because the onDirectionsLoad handler has been added to both
directions1 and directions2.  If directions2 returns a result before
directions1, it will fail.

  -- Larry



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