In case anyone else is looking to do this: Once you sign up for Google Maps and get a key, you might wonder how to put a map in a node without having to put the load() and GUnload() functions in the body tag. The following code shows the method I used. Just be sure to have a lax filter so that no tags are scrapped.
** Warning: This method will probably cause problems on pages that aggregate more than one node on a page, since the javascript might be loaded more than once.**
function applyst() {
load();
if( window.XTRonload ) { window.XTRonload(); }
}
function savest() {
GUnload();
if( window.XTRonunload ) { window.XTRonunload(); }
}
//load handling adapted from
//http://www.brothercake.com/site/resources/scripts/onload/
if( window.addEventListener ) {
window.addEventListener( 'load', applyst, false );
window.addEventListener( 'unload', savest, false );
} else if( document.addEventListener ) {
document.addEventListener('load' , applyst, false );
document.addEventListener( 'unload', savest, false );
} else if( window.attachEvent ) {
window.attachEvent( 'onload', applyst );
window.attachEvent( 'onunload', savest );
} else {
if( window.onload ) { window.XTRonload = window.onload; }