views:

136

answers:

0

I need to get the list of markers after I load them on the map from a kml file with

map.addOverlay(geoxml);

I tried this

 geoxml = new GGeoXml("http://www.mydomain.com/mykmlfile.kml");
      GEvent.addListener( geoxml, "load", function( ) {
        if ( geoxml.loadedCorrectly( )) {

          var markers = geoxml.overlayman.markers
          for (j=0; j<markers.length; j++) {
            alert(geoxmlvar.overlayman.markers[j])
          }
        }
    })

But geoxml.overlayman is not defined. What am I doing wrong?