On May 31, 9:42 pm, András Sevcsik <[email protected]> wrote:
> Is there any way to pass an additional argument to
> GClientGeocoder.getLatLng's callback? I want to update a GMarker's
> latLng in the callback, but I can't pass the marker's haldle to the
> callback.

Instead of
  geo.getLatLng(address,function(result,marker) { ... } )

you can use a helper function to achieve function closure and keep
everything together:
  function myFunc(address,marker) {
    geo.getLatLng(address,function(result) {
      // marker is available in this function
      // as a local variable of myFunc
      // along with address
    }

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