Here is the code i\'m currently running: The user is able to create their own polygon after their polygons are shown on the map i want to display some information about ever
One way to associate the infoWindow contents with the polygon is to use function closure, as done in this example (see the createClickablePoly function). If you don't need a clickable sidebar, you can simplify that function to:
function createClickablePoly(poly, html) {
var contentString = html;
google.maps.event.addListener(poly,'click', function(event) {
infowindow.setContent(contentString);
infowindow.setPosition(event.latLng);
infowindow.open(map);
});
}