I have a question on too many webGL contexts on a dashboard with multiple WebMapViewers. I don’t reload them and they drop off as newer WebGL contexts and I get a sad face on PCs (not usually on Macs).
[Error] There are too many active WebGL contexts on this page, the oldest context will be lost.
getContext
_setupPainter (maplibre-gl-x10bc4046111b1056.js:46:414296)
(anonymous function) (maplibre-gl-x10bc4046111b1056.js:46:396457)
render (Xojo-xf7cd07146d6aa4b3.js:9861)
refreshCallback (Xojo-xf7cd07146d6aa4b3.js:2727)
doControlRefreshes (Xojo-xf7cd07146d6aa4b3.js:2990)
What’s the general advice on this? Yes, I know I could just use one MapViewer, but I want to see if I can get a solution working.
Should I use a placeholder ImageViewer until the MapViewer is needed and switch between them?
Or should I hide the MapViewers when the dashboard is not visible and then show when visible?
I can’t imagine what you’re trying to achieve, but maybe you could have one or two WebMapViewer offscreen, then call WebMapViewer.ToPicture and send the resultant image to WebImageViewer.
I have a MainPage dashboard with 4 listboxes. Above each listbox is a maplibre mapViewer which loads a map and places a pin at the location of the selected row in the listbox. Users can interact with the map to zoom in, pan or select a pin and open another page.
After 30mins of use on PCs, the dashboard maps go white with a sad face icon. The errors in the browser console are “too many too many active WebGL contexts”. I am trying to stop this happening.
Some suggestions I’ve heard are to use a starting map image in an imageViewer and only show the map view when a row is selected in a listbox.
The MainPage is refreshed when something needs to be updated (rows move from one listbox to the next), but other than that, I show the existing MainPage when returning from other web pages.