Fallback to raster tiles if the browser does not support WebGL
What does this MR do?
Mapbox.js currently requires WebGL to render vector tiles in the browser. There still seems to be a significant number of users using browser not supporting WebGL, thus this adds a fallback to use raster tiles if WebGL is not supported.
How confident are you it won't break things if deployed?
Very, if WebGL is supported nothing should change.
Links to related issues
https://yunity.slack.com/archives/C74JC2V26/p1586781181149900 https://yunity.slack.com/archives/C1T1ZM9A4/p1587203029464900
How to test
Check that the map still works for you. Especially, interesting if you have a browser which does not support WebGL (you can test WebGL support via https://get.webgl.org/). Otherwise, you can disable WebGL in your browser and check whether the map still works (e.g. in Firefox, go to about:config and set webgl.disabled to true).
- Checkout branch locally
- Login as foodsaver
- Test whether the map is displayed properly at the following places
- The global map under /karte http://localhost:18080/karte
- The address pick map under settings http://localhost:18080/?page=settings&sub=general
- The map on a basket detail page http://localhost:18080/essenskoerbe/38971
- The find basket map (click on the basket in the topbar and then on "all baskets") http://localhost:18080/essenskoerbe/find
- The region admin tool http://localhost:18080/?page=region (log in as orga)
Checklist
-
added a test, or explain why one is not needed/possible... -
no unrelated changes -
asked someone for a code review -
joined #foodsharing-beta channel at https://slackin.yunity.org -
added an entry to CHANGELOG.md (description, merge request link, username(s)) -
Once your MR has been merged, you are responsible to update the #foodsharing-beta Slack channel about what has been changed here. They will test your work in different browsers, roles or other settings