Yep. Use a callback. Check the docs here: http://code.google.com/apis/maps/documentation/javascript/services.html#DisplayingResults
Chris On Thu, Jan 6, 2011 at 9:48 PM, Matei <[email protected]> wrote: > Hi everybody. > > This is my first post on this forum :) > > So I'm actually having my first steps with the Google Maps API v3 and try > to use the directions service, based on examples provided in the online > documentation. > > Everything is fine except when it comes to use the setDirections() > function. If my understanding is correct, this function is called with a > DirectionsResult parameter, which will create all necessary overlays and > display them on the map, and also generate the HTML corresponding to the > directions and destined to the <div> element provided previously. > > What is annoying is that all these tasks will be performed asynchronously > so I find a way to execute code AFTER these tasks are completed ! > > So does anyone know a way to achieve this (e.g. via callback) ? > > Thanx in advance > > -- > You received this message because you are subscribed to the Google Groups > "Google Maps JavaScript API v3" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-maps-js-api-v3%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-maps-js-api-v3?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" 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-js-api-v3?hl=en.
