I don't remember the details, but expect browsers to differ on details of this API basically forever.
The scenario I imagine is:
1. Your map is loaded
2. User opens a new tab (your map is now in a background tab)
3. User restarts browser and existing tabs are loaded
4. You get charged for an API load even though the page is not visible
Does anyone know if this is the case?
Edit: also analytics. If you don't load your GA until page is visible, I wonder what impact that has on your visitor numbers
I discovered a bunch of these edge cases and had to abandon the approach - it just wasn't reliable. The page would fail to recognize departure + return in too many scenarios and so wouldn't refresh.