On Jul 20, 6:09 am, kentuky <[email protected]> wrote:
> Hi Larry,
> no i haven't got a debugger ;(
> But the Marker funktion ist defined at
>
>   var marker = createMarker(point,label,icon,tab1,tab2);

But createMarker doesn't return marker until the GDownloadUrl call
back function runs (which is too late...)

>   map.addOverlay(marker);
>
> So i didn't understand why this is not okay.
> The Script has an error since i added the tabs.
>
> Is there a solution to fill the Markertabs at the clickevent from a
> html file ?

Yes.  If you are using GDownloadUrl, you can't use the data it returns
until the callback function runs.  Open the infowindow and create the
DOM elements you need in the click event handler, then access them
from the callback function. Be sure to handle the case when the
GDownloadUrl call fails...


  -- Larry
>
> Thanx
>
> > Do you have a javascript debugger?
>
> > The line of your code that is causing that error is:
> >   map.addOverlay(marker);
>
> > Because marker is undefined.
>
> > GDownloadUrl is asynchronous, it will not return "marker" to the
> > calling function.
>
> >   -- Larry

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