As best as I can figure, you can get a list of the number of markers
in the GGeoXml object by the count of the 'nc' elements. example:
var geoXml = new GGeoXml( url );
GEvent.addListener(geoXml, 'load', function() {
if (geoXml.loadedCorrectly()) {
alert( geoXml.nc.length ); // <== THIS GIVES US THE NUMBER OF
ELEMENTS LOADED.
}
});
Someone could correct me if I'm wrong.
-Mike Ethetton
http://mastertoolworks.com
http://mappingcenter.org
On Jul 9, 3:17 pm, nemesis256 <[email protected]> wrote:
> It worked using GDownloadUrl. Thanks!
>
> On Jul 9, 12:16 pm, Mike Williams <[email protected]> wrote:
>
>
>
> > You could listen for map "addoverlay" events.
>
> > The awkward thing is working out the timing. There's be one "addoverlay"
> > for theGGeoXmlcall itself. I guess that if you only see one such event
> > between issuing the addOverlay(ggeoxml) call and receiving its
> > completion callback, then there were no contents. You'd need to
> > experiment a bit to see if that's exactly what happens.
>
> > If the KML generator script is in the same domain, you could
> > GDownloadUrl it and count the <Placemark>s.
>
> > if (xmlDoc.documentElement.getElementsByTagName("Placemark").length==0)
>
> > That's a bit inefficient because the KML gets fetched twice, once to the
> > Google server and once to the browser.
>
> > --
> > Mike Williamshttp://econym.org.uk/gmap
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---