Hi,

Thanks for all the responses - I'm going to put this down to a case of
code bindness!

I had realised that I'd used google.setOnLoadCallback(BuildMap())
instead of google.setOnLoadCallback(BuildMap)!

Thanks everyone for their help!

Mark

On Nov 18, 11:21 am, Mike Williams <[email protected]> wrote:
> Wasn't it markpirvine who wrote:
>
> >Can anyone offer a reason why this works and google.setOnLoadCallback
> >(BuildMap()) doesn't?
>
> That syntax calls BuildMap() immediately (at which time google.maps.Map2
> isn't a constructor) and uses the value that BuildMap() returns (if it
> hadn't crashed) as the reference to the function to be executed on
> callback.
>
> google.setOnLoadCallback(BuildMap)
>   is the equivalent of
> google.load("maps", "2", { "callback": BuildMap});
>
> --
> Mike Williamshttp://econym.org.uk/gmap

--

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


Reply via email to