> var geoXml = new GGeoXml("http://heinztrucking.com/files/gps/
> expr.kml",
> function() { zoomToGeoXML(geoXml); });
Is that sensible syntax? You're setting a callback function with a
parameter of a local variable (geoXml) that will disappear from scope
after your initialize() has finished (before GGeoXml returns data).
I'm also a bit worried about the next line -
map.addOverlay(geoXml);
That will be performed before the asynchronous GGeoXml data has come
back, before your centering callback runs. It's generally recommended
to always perform a map .setCenter() before trying to add any
overlays, I don't know if that also applies to GGeoXml overlays which
don't really get added until later.
I'm not really sure why you are doing those calculations in the
callback anyway, why not use .gotoDefaultViewport()
cheers, Ross K
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---