That makes sense, thanks for the quick answers
I'll definitely try beforeRender and possibly post something here to help the others that are probably facing the same questions of mine
On 2.10 the only one I got working correctly is with the snippet I sent you but I'm glad I've found a possible solution. I hope this can also help the others that are trying to integrate Mapbox and run into the same issue
Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.