Gregory, I have changed it as you suggested. But this doesn't work also. I think the problem is a Javascript variable scope problem. But as I am new to Javascript also. I dpn't know how to handle it.
Thanks again...Guido On 23 Jul., 16:03, Gregory Short <[email protected]> wrote: > Sorry, for clarity, I meant something like the following: > > function InitMap() > { > GDownloadUrl("data.xml", CheckDataAndResponse); > alert(markerdata); > } > > function CheckDataAndResponse(stringdata, responseCode) > { > //alert("Der R ckgabewert war : "+responseCode) > alert(stringdata); > markerdata = stringdata; > markers = parseMarkerData(); > CalculateCenterAndBounds(); > DrawMarkers(); > alert(markerdata); > } > > On Jul 23, 2009, at 8:59 AM, Gregory Short wrote: > > > > > function parseMarkerData() > > { > > var xml = GXml.parse(data); // <--- Where is "data" being > > defined? > > return xml.documentElement.getElementsByTagName("marker"); > > } > > Perhaps you meant "markerdata"...but then you have problems with the > > asynchronous nature of GDownloadUrl...One solution might be to fire > > off the chain of function calls that parses the xml and populates > > the map from within CheckDataAndResponse. > > On Jul 23, 2009, at 8:41 AM, guido wrote: > > >> Hi @all > > >> I have a problem using GDownloadUrl and accessing the data coming > >> into > >> the callback function. I must say that I am really new to Google maps > >> and to Javascript so please be patient. The link to my site is > >>http://status.taxikomm24.de/10/index_neu.html > > >> As you can see if the callback function "CheckDataAndResponse" is > >> called all the data is perfectly there. But as soon as I want to > >> access the variable makerdata, which is defined as global, in the > >> function "INITMap". The variable markerdata is undefined. > > >> Please can someone help me with this. Any suggesition is welcome. > > >> Thanks..Guido- Zitierten Text ausblenden - > > - Zitierten Text anzeigen - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
