I also have a version of the layout that uses a Google static map and that does render on switching to Preview.
I assume that the web viewer reloads the HTML page on changing mode, but can't think why this would fail.
I have worked out where the problem lies and worked around it, but not fathomed the reason for the behaviour:
A 'SummaryReport' layout shows a list of locations and a web viewer displaying a Leaflet-based map with those locations as markers.
The 'SummaryReport' layout is opened from a popover-based menu that calls a script 'ReportWithMap' that GTRRs to the layout in a new window and switches it to preview mode.
Originally, the map generation script 'PrepareMap' was called by the SummaryReport's OnLayoutEnter trigger (this script generates JSON for the markers, inserts that into the HTML skeleton code, exports it to the temp directory, then sets the web viewer to use that path). This shows the map in browse mode but not in preview mode. I tried triggering from the SummaryReport layout's OnModeEnter trigger but this didn't work either.
I moved the call to 'PrepareMap' into the 'ReportWithMap' script between the GTRR and Goto Preview Mode steps and the map is now rendered in Preview Mode (although it needs a short pause to allow the webviewer to load the map tiles).
While this solves my problem, it doesn't explain why this was happening.
Can anyone enlighten me?
It sounds like your resources are being tidied up when you switch to
preview mode. Have you tried to run the process while you are watching
the temp folder? You may see something happening there that explains the