As I work with the Mapbox GL JS API to manipulate maps, I find myself wondering if there is an event that can inform me whenever a new tile HTTP request is made. My code snippet looks like this:
map.on("dataloading", e => {
if(e.dataType === "source" && e.source.url && e.tile) {
//Is this a fresh HTTP request to the Mapbox API?
}
});
You can refer to this & this documentation for more information.