I want to close the current infowindow when I click on any next marker, for now it shows all infowindows after clicking.
My JavaScript
var marker = new MarkerWithLabel({
position: latlng,
draggable: false,
raiseOnDrag: true,
map: map,
icon: 'a.png',
labelContent: '<?php echo $rating.' % Review '.$review;?>',
labelAnchor: new google.maps.Point(22, 0),
labelClass: "labels"
});
marker['infowindow'] = new google.maps.InfoWindow({
content: '<p><?php echo $name ;?></p>'
});
google.maps.event.addListener(marker, 'click', function() {
this['infowindow'].open(map, this);
});