On Feb 8, 7:50 am, xelawho <[email protected]> wrote: > > A function that is called in the initialize function, doesn't need to > > be defined there. > > it's quite possible that I have this completely the wrong way around, > but the way that I read that is that this should be a global variable: > var bounds = []; > (or var bounds; - neither seems to work) > > this should come after the map has been set up in initialize: > var bounds = new google.maps.LatLngBounds();
That creates a new "bounds" variable that is local to the initialize function. bounds = new google.maps.LatLngBounds(); would initialize the one you defined in the global scope. -- Larry > > and the function should be placed and get called in the global scope. > > which definitely gets me a more interesting-looking error, but still > an error. -- You received this message because you are subscribed to the Google Groups "Google Maps API V2" 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.
