开发者

Retrieving the list of markers loaded from a ggeoxml

开发者 https://www.devze.com 2022-12-25 09:47 出处:网络
I need to get the list of markers after I load them on the map from a kml file with map.addOverlay(geoxml);

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", fu开发者_如何学运维nction( ) {
        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?

0

精彩评论

暂无评论...
验证码 换一张
取 消