Is this for the marker that you just created?
If so you can store the address details in an array and use them to populate the infowindow in the markers click event.
If not you could do some thing like this :-
google.maps.event.addListener(Marker, "click",function() {
geocoder.geocode({'latLng': this.getPostion()}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
wincont = ''
$.each(results, function(){
$.each(this.address_components, function(){
switch (this.types.join(", ")) {
case 'street_number':
wincont += this.long_name
break;
case 'route':
wincont += this.long_name
break;
case 'locality, political':
wincont += this.long_name
break;
case 'postal_code':
wincont += this.long_name
break;
}
});
});
gInfoWindow = new google.maps.infowindow()
gInfoWindow.setContent(wincont);
gInfoWindow.open(gMap,marker);
} else {
alert("An Error Occurred with Google's Geo-location Look up, Please Try again");
}
});
note that this is using jQuery, you can just as easily use a normal for each loop, the results set can contain multiple results, you can just use the first if you wish, at the moment it will populate the infowindow with EVERY result (probably not what you want!) but it should be easy to only use the first result.
also note that this is only looking for specific address fields, this is copied from some old code where I only needed those fields, the post code value often comes back with only the general area code so you may want to do a length check on it first.
If you have multiple markers on the map you will want to bind a click event to each of them, I usually store an array of markers and add the event to the array reference.