mapPageElement should indeed be global. Made that change and, as you surmised, the error is still the same since it never got to the Map constructor that would have failed on reference to mapPageElement.
I can't locate any definitive documentation on the workings of the API Loader, particularly, the callback-on-load mechanism. The only resort seems to be trial and error based on examples. I would like to use the loader for other API's as well (e.g. earth, visualization, scriptaculous, prototype ) and not start executing any client code until the page/DOM and all API's are loaded. Can someone direct me how best to do that? On Jan 23, 3:45 pm, Rossko <[email protected]> wrote: > > Following is a what I thought was a simple variant of > > >http://gmaps-samples-v3.googlecode.com/svn/trunk/commonloader/commonl... > > function pageLoaded( ) { > > var mapPageElement = document.getElementById("map_canvas"); > ... > > function mapsLoaded ( ) { > > var map = new google.maps.Map( mapPageElement, myOptions); > > mapPageElement would be out of scope when needed, but that doesn't > seem to tie in with your error message. -- 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.
