Hello,

I am loading a KML file like this

var map = new GMap2(document.getElementById("map"));
var gx = new GGeoXml("http://something.com/
FlowMonitorPts_20080915.kmz");
map.addOverlay(gx);

It works fine. I can see the overlay with all the markers.
I have added a listener to the map, like this

GEvent.addListener(map, "click", function(marker, point)
{
if (marker)
                {
                        var markers = document.getElementsByTagName("marker");
                        if (markers == null)
                                alert("Null");
                        else
                                alert(markers.length);
                        var html = "Marker <b>" + marker.id + "</b>";
                        //alert("Flow monitor clicked");
                        marker.openInfoWindowHtml(html);
                }
        });

--~--~---------~--~----~------------~-------~--~----~
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