I have a situation where I am trying to reference div tags in
infoWindow's on my markers.

At the time of creating markers I am attaching listeners for the
mouseover events passing in the html as per the code extract below:

//unitData[0] = a unique id

=====================
var unitPoint = new GLatLng(unitData[1], unitData[2]);

var unitHtml = '<div id=\"div'+unitData[0]+'\"><b>'+title+'</b><br/
><br/>'+unitData[4]+'</div>';

var unitMarker = createMarker(unitPoint,unitHtml,markerOptions,unitData
[0],null,"unit",2)


function createMarker
(point,html,markerOptions,untID,hitID,category,importance) {
        var marker = new GMarker(point,markerOptions);
        marker.untID=untID;
                marker.hitID=hitID;
                marker.category=category;
                marker.importance=importance;

                var infoWindowOpts = {
                        maxWidth:250
                };

        // The new marker "mouseover" listener
                GEvent.addListener(marker,"mouseover", function() {
          marker.openInfoWindowHtml(html, infoWindowOpts);

        });

        return marker;
}
========================

Basically I am receiving position updates and new text description
which needs to be set in the associated infoWindow's for my markers.
When I get an update I try to find the div's using
document.getEllementById() but I cannot reference them as they are
hidden. If they are showing its not a problem but of course they are
not necessarily going to be showing.

Is there a way round this? Or can someone suggest a better approach I
can take?

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