Thank you very much!

Now I understand that some arguments were passed under the surface
through the GEvent.addListener method to the function which
"getAddress" points to.


On Jul 20, 3:07 pm, "[email protected]" <[email protected]>
wrote:
> On Jul 20, 2:15 pm, "sam.h" <[email protected]> wrote:
>
> > Hi,
>
> > I am really new to the forum and to development on GMap. I have a
> > question when I was reading about reverse geocoding in the following
> > link:
>
> >http://code.google.com/apis/maps/documentation/javascript/v2/services...
>
> > I am confused about the getAddress function where if one of the
> > arguments 'latlng' is null, the function does nothing. My question is,
> > when the function is registered with the click event as in the line
> > 'GEvent.addListener(map, "click", getAddress);'
> > No parameter seem to be passed to the function.
>
> That is a function pointer not a function, you can't pass arguments
> that way if you do this:
> 'GEvent.addListener(map, "click", getAddress());'
> The "getAddress" function will be executed and its return value will
> be used as a function pointer (usually not what you want).
>
> > So eventually the function will do nothing?
>
> No, it will be called with the arguments specified in the
> documentation for that event.
>
> http://www.google.com/search?client=gmail&rls=gm&q=javascript%20funct...
>
>   -- Larry
>
>
>
> > I must be wrong but can anybody tell me why? How can the getAddress
> > function get its parameters? Thanks a ton in advance!
>
> > Regards,
> > Sam- Hide quoted text -
>
> - Show quoted text -

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