Hi there

On a couple of pages on my site I call the google maps routines via an
init() style function by using window.onload=function() { init(); }
within the HTML body rather than the body tag itself.
This calls the map and associated functions perfectly well and I am
happy with developing routines to work with the maps. My problem
however is that each page has several onload routines attached (ie:
live clock & date on each page) but these fail to execute on any pages
with a map. Is there some sort of blocking return going on with the
maps? I have tried using a really simple init() style function and
this makes no difference.

The additional onload functions are called using the following
function:

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof(window.onload) != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
          if (typeof(func)=='function') {
        func();
          } else {
                  func=function() { };
          }
    }
  }
}

I have tried creating a basic page with a map and only 1 onload
function call using the above function and yet again the function
fails to get called...even though it is called before the maps
routines load. Calling the init() function from the body tag also
makes no difference.

I have done some more testing today and found that no matter the
location or manner of calling additional functions using an onload
handler they will not load in addition to the map. Please - what is
going on?


-- 
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.

Reply via email to