I'm seeing something interesting when I load textual directions into a div using GDirections. What makes it more complicated is that I'm doing this in a Google gadget. Two important things are happening: first, I call GDirections.load to insert the directions into my div. Then, on the GDirections.addoverlay event, which the documentation says fires AFTER textual directions have finished loading into any divs, I call the function that resizes the gadget to match the height of its content (gadgets.window.adjustHeight).
The problem: the gadget ends up slightly too short. A little experimentation has led me to believe that the difference is the height added to the gadget content by the two images of green "A" and "B" marker icons in the textual directions. In Webkit browsers, these images seem to finish loading AFTER the gadget is resized. I could do something hacky like put the resize function on a setTimeout, or even use jQuery to remove the images from the textual div, but I'm wondering if there's a better solution. Can I somehow trigger the resize after these images load completely? You can recreate the problem in the gadget on Safari and Chrome on Mac by entering "From: bos" and "To: sfo" as your addresses. Get the gadget by adding it to your iGoogle at: http://www.google.com/ig/adde?moduleurl=hosting.gmodules.com/ig/gadgets/file/114281111391296844949/driving-directions-dev.xml The gadget code itself is at: hosting.gmodules.com/ig/gadgets/file/ 114281111391296844949/driving-directions-dev.xml Thanks for any help with this one. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
