I don't do mapplets, but the obvious thing to try would be

GEvent.addListener(marker,"click",function() {
  marker.getPointAsync(function(point) {
    marker.openInfoWindowHtml("This marker is located at: "
         + point.toUrlValue(5));
  });
});

I believe a double callback allows the second callback to access the
variables in the outer activation frame. In the unlikely event that
that's not the case you'd need to obtain fresh function closure on the
marker variable. So if the above fails with "marker is not defined" try
this:

GEvent.addListener(marker,"click",function() {
  var mymarker = marker;
  mymarker.getPointAsync(function(point) {
    mymarker.openInfoWindowHtml("This marker is located at: "
         + point.toUrlValue(5));
  });
});

-- 
http://econym.org.uk/gmap
The Blackpool Community Church Javascript Team


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