Trigger event after GDirections.loadFromWaypoints in Google Maps API

Posted by Soldarnal on Stack Overflow See other posts from Stack Overflow or by Soldarnal
Published on 2008-12-03T15:47:41Z Indexed on 2010/03/30 16:23 UTC
Read the original article Hit count: 562

Filed under:
|

I'm attempting to add some text to the directions results the Google Maps API returns to the specified div (directionsPanel). This code below would work fine, except that the jQuery line fires before loadFromWaypoints has finished modifying the DOM. If I run that line by manually triggering it after the directions content has finished loading, it executes as expected.

directions = new GDirections(map, directionsPanel);
directions.loadFromWaypoints(waypoints);

$("td[@jscontent='address']").append(" some content");

How can I add some sort of listener (on perhaps either the loadFromWaypoints callback function or the directionsPanel div itself) to execute my jQuery line after the DOM has finished reloading?

© Stack Overflow or respective owner

Related posts about google-maps

Related posts about JavaScript