I have a website with the carto.js library and some layers loaded. If I click on a feature, an Infowindow is opening up.
I know that there is an event for the feature click:
sublayer.on('featureClick', function(e, latlng, pos, data) {
alert("Hey! You clicked " + data.cartodb_id);
});
}).on('error', function() {
//log the error
});
But I have not found any information on how to listen for the close event. Is it possible to create a listener on the close event of the infowindow?
Usecase: Change map content while the popup is open.