Great, now I have truely learned something today :-) thank you! I made var map; var markerCluster; into global variables as you suggested and have the markerCluster = new MarkerClusterer(map, markers); in the processMyData-function.
Belive it or not but I do not get any erros in FF right now. On the downside is that I get no markers on the map either... :-(( >From the bottom and up... 1. XML is ok: <?xml version="1.0" ?> - <markers> <marker id="95" address="" lat="98.3307" lng="7.98431" type="" /> <marker id="96" address="" lat="28.4198" lng="-81.5802" type="" /> <marker id="97" address="" lat="56.6375" lng="16.4998" type="" /> <marker id="98" address="Sea World, Orlando, FL 32821, USA" lat="28.4116" lng="-81.4591" type="" /> <marker id="99" address="Tract C, Virgin Islands" lat="18.3166" lng="-64.9564" type="" /> <marker id="100" address="78-100 Tract F, Virgin Islands" lat="18.3217" lng="-64.9527" type="" /> <marker id="102" address="Tract C, Virgin Islands" lat="18.3167" lng="-64.9568" type="" /> </markers> 2. The XML is passed into processMyData-function which iterates through it with a for-loop. 3. For each marker in the for-loop the createMarker-function is called and creates marker. 4. The marker is returned and allocated to the "var marker" 5. markers.push(marker); 6. markerCluster = new MarkerClusterer(map, markers); Shouldn't this work...? How do I go from here? /Nimrod On May 14, 2:28 pm, Andrew Leach <[email protected]> wrote: > On May 14, 1:17 pm,nimrod<[email protected]> wrote: > > > > > The GDownloadUrl(url,processMyData) gets the data from the specific > > URL. It "send" it to the processMyData-function. That functions > > process the data and should display the markers on the map. > > > Is that correct? > > Yes. > > > I've progressed one step and FF is not liking that var markerCluster > > not is defined. I have markerCluster in the processMyData-function but > > the map-argument is defined in the initialize()-function. Is that why > > FF is complaining about markerCluster? > > Yes. Or nearly, anyway. > > I would suggest adding these lines outside ANY function: > var map; > var markerCluster; > then move your existing lines which start like that inside the > intialize() function but remove the "var" keyword. > map = new GMap2(document.getElementById('map')); > markerCluster = new MarkerClusterer(map, markers); > > What that does is make "map" and "markerCluster" into global > variables, which are available to any function. They are then assigned > values in the initialize() function. > > 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 -~----------~----~----~----~------~----~------~--~---
