Hi Rossko

I understand the async issue now but i'm not sure HOW to implement
your suggestion. Is your reference to a marker manager my array (I
dont actually have a marker manager defined). This being my code
snippet...

GDownloadUrl("genxmlO.php", function(data, responseCode) {
          if(responseCode == 200) {
            var xml = GXml.parse(data);
            var markers = xml.documentElement.getElementsByTagName
("marker");
            for (var i = 0; i < markers.length; i++) {
              var Name = markers[i].getAttribute("Name");
              var Url = markers[i].getAttribute("Url");
              var Type = markers[i].getAttribute("Type");
              var point = new GLatLng(parseFloat(markers
[i].getAttribute("X")), parseFloat(markers[i].getAttribute("Y")));
              Omarker = createMarkerO(point, Name, Url, Type);
                          MGroup.push(Omarker);
            }
          } else if(responseCode == -1) {
            alert("Data request timed out. Please try later.");
          } else {
            alert("Request resulted in error. Check XML file is
retrievable.");
          }
        }); //GDownloadurl

...which bit should I move out? The MGroup.push bit? Appreciate your
patience.

Tassie



On Nov 27, 10:49 am, Rossko <[email protected]> wrote:
> > Is my marker array not yet populated and if not where should I move my
> > markerclusterer create to?
>
> GDownloadUrl is asynchronous, see
>    http://econym.org.uk/gmap/async.htm
>
> The work flow could be something like -
> XML request A fired
> XML request B fired
> XML request C fired
> MarkerMager called on empty array
> .... long wait here ...
> XML data B returns and is processed
> .... wait some more ...
> XML data A returns and is processed
> During that processing, XML data C returns and is processed partly at
> the same time
>
> The simplest approach would be to call MarkerManager at end of each
> XML-processing function.

--

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