Apologies if this has been answered before, but I was referring to
Mike's tutorials to add polygons to my map (rather adding more stuff
to the info window).

Overlooking the message at the top the first go around, I noticed that
v2.88 supports the clickable polygons.

But with no avail, I am a little stumped as to what is going wrong.

I would like to add an image on one side of the infowindow, then
details on the other side (not a big deal but it would hopefully clear
up the confusion).

Here is a link to the map Pre-change: http://redhawks.semo.edu/map/daniel.html

Due to not having a vpn or anyway of updating without being on the
University lan, here is my current idea for code.


var polys = [];
var labels = [];
var htmls = [];
function CreatePolygon(pts, label, colour) {
        var poly = new GPolygon(pts,"#000000",1,1,colour,0.5,
{clickable:true});
        polys.push(poly);
        labels.push(label);
     //   htmls.push(html);

building = '<div class="infomain">' + '<div class="infoleft">' +
'hello' + '</div>' + '<div class="inforight">' +  label + '</div>' +
'</div>';


GEvent.addListener(poly, "click", function() {
map.openInfoWindowHtml(pbuilding);
});

        return poly;

}


var request = GXmlHttp.create();
request.open("GET", "states.xml", true);
request.onreadystatechange = function() {
if (request.readyState == 4) {
  var xmlDoc = GXml.parse(request.responseText);

  // ========= Now process the polylines ===========
  var states =
xmlDoc.documentElement.getElementsByTagName("state");

  // read each line
  for (var a = 0; a < state.length; a++) {
        // get any state attributes
        var label  = states[a].getAttribute("name");
        var colour = states[a].getAttribute("colour");

        // read each point on that line
        var points = companies[a].getElementsByTagName("point");
        var pts = [];
        for (var i = 0; i < points.length; i++) {
           pts[i] = new GLatLng(parseFloat(points[i].getAttribute
("lat")),
                                                   parseFloat(points
[i].getAttribute("lng")));
        }
        //var htmlObject = companies[a].getElementsByTagName("html");
        //if (htmlObject.length > 0)
       //         var html = htmlObject[0].childNodes[0].nodeValue;
        //else
        //        var html = "";
                // Create Polygon

        var myPoly = CreatePolygon(pts, label, colour);
        map.addOverlay(myPoly);
  }
  // ================================================
}
}

request.send(null

=============================================================

Sorry for the code, I know it is not the preferred method, but it is
all I have available at the moment.

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