In your createMarker() you're calling
     var catches = new getCatches(sid);
getCatches() is a function, so 'catches' is just a copy of that
function.
You can't print a copy of a function in your infowindow.

If you were to call getCatches() in the conventional way, it still
wouldn't work because you're not taking any account of GDownloadUrl()
being asychronous.
Calling getCatches() would trigger the sending of a GDownloadUrl()
request, but it **does NOT wait for** the data to come back and
returns immediately.
     var catches = getCatches(sid);
would result in 'catches' always being null.
Some time later the data would arrive back, but nothing would get done
with it.

You need to adopt a different strategy in building the infowindow.
Perhaps have the marker click listener issue the GDownloadUrl()
directly (when it is clicked) and put the infowindow building code
into the GDownloadUrl's callback function, where the data is actually
available.

function createMarker( ...) {
     .....
    GEvent.addListener(marker, 'click', function () {
          .....
          GDownloadUrl(url, function (data, responseCode) {
                 do things with 'data' to construct 'html'
                 marker.openInfoWindowHtml(html);
           } );   // end of callback function
      } );   // end of click listener
}     // end of createMarker

http://econym.org.uk/gmap/async.htm
--~--~---------~--~----~------------~-------~--~----~
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