Hi !
Might be simple but I can't find a way to detect WebGL using a fresh arcgis/cli application.
I try to apply the same principle as described in this tutorial:
Detect WebGL support | ArcGIS API for JavaScript 4.7
In this app, I believe it should be handle in AppViewModel but I can't find a way to "catch" the fact the view was rejected. I even tried directly after creating the view in 'onAfterCreate' method of the app View but it still never catch that the view is rejected.
Could it be because of the webpack configuration ?
Any idea ?!
Thanks !
Solved! Go to Solution.
With that sample, it's using SceneView, so that works a little different than a MapView.
SceneView won't work at all without WebGL, but MapView doesn't need WebGL, so it doesn't throw an error without WebGL. The cli template app, has it enabled by default and uses VectorTiles which do require it not matter what.
You can do your own detection up front though.
Detect WebGL - Learn web development | MDN
That would be a good solution.
With that sample, it's using SceneView, so that works a little different than a MapView.
SceneView won't work at all without WebGL, but MapView doesn't need WebGL, so it doesn't throw an error without WebGL. The cli template app, has it enabled by default and uses VectorTiles which do require it not matter what.
You can do your own detection up front though.
Detect WebGL - Learn web development | MDN
That would be a good solution.
Of course ! It is a sceneView !
Thanks for the quick reply !