tangrams / tangram-frame

A nice frame for displaying a Tangram map.
MIT License
9 stars 3 forks source link

Provide a notice for devices where webGL is disabled or not present #26

Closed louh closed 7 years ago

louh commented 7 years ago

Feedback from this past week while at the CfA Summit. Tangram maps do not, by default, fallback to anything if WebGL is unavailable. (See this issue on Tangram for more: https://github.com/tangrams/tangram/issues/288) Despite very good browser support, WebGL can be unavailable for the following reasons:

In these cases tangram-frame fails silently, which is not great.

For other apps / maps I've made, if the Tangram scene is mostly just used as a base map layer, we can provide an alternate raster map fallback (e.g. Stamen toner for Refill) without losing the substance of the map. But if the map scene itself is the most important part of the thing (e.g. animated scenes, like TRON), or for highly customized scenes, raster fallbacks are not doable -- and similarly customized raster fallbacks are outside the scope of tangram-frame. (For an example why this is the case, you can see how a Leaflet raster-based fallback cannot be generalized and must be implemented in parallel to a Tangram scene in this project).

Given that (a) tangram-frame can display any kind of scene file, and (b) specific raster fallbacks are not a part of the Tangram API or Tangram Play metadata, tangram-frame cannot make assumptions about fallback maps, but should display some information about the failure instead of nothing. Here is a WIP of the screen:

screenshot 2016-11-05 17 19 00

Speaking with @kkowalsky, we should also provide further context about the error (e.g. what WebGL is, and why it's needed, and perhaps some troubleshooting) in a "Learn more" link. I haven't found anything on the web that does this neatly for us, so it's possible we would need to write this ourselves as part of our documentation. In the attached PR, I have written the link as a comment because its destination doesn't exist yet.