I'm developing an app with Google maps that should display several categories on a map. Now I would like to have the possibility to add markers from several categories and delete them as well if necessary.
I'm using the infobox plugin, which makes it possible to customize the windows infoboxes. You can find it HERE
My question. I want one infobox to close when you click another marker. I don't know how to, though. This is the code I used for the click event on the markers.
CODE
google.maps.event.addListener(marker, 'click', (function(marker, i) {
return function() {
newMarkers[i].infobox.open(map, this);
map.panTo();
}
})(marker, i));
Anyone that can help me with this?