[openstreetmap/openstreetmap-website] Add Human facing error messages when users without WebGL use (PR #6782)
Frank Elsinga
notifications at github.com
Sun Feb 8 04:23:14 UTC 2026
@CommanderStorm commented on this pull request.
> @@ -7,6 +7,34 @@ maplibregl.Map.prototype._getUIString = function (key) {
return OSM.i18n.t(`javascripts.map.${snakeCaseKey}`);
};
+OSM.MapLibre.showWebGLError = function (container) {
+ const containerElement =
+ typeof container === "string"
+ ? document.getElementById(container)
+ : container;
+
+ if (containerElement) {
+ const errorDiv = document.createElement("div");
+ errorDiv.className = "maplibre-error";
+ errorDiv.setAttribute("data-compact-message", "WebGL is required for this map.");
+ errorDiv.innerHTML = `
+ <p>
+ We are sorry, but it seems that your browser does not support
Shure, adding a hint for settings is resonable.
<img width="900" height="749" alt="image" src="https://github.com/user-attachments/assets/19712764-53c8-4a13-a15a-1f9368cf55ee" />
If the device is broken, this is not something that is easily detectable for us or fixable for the user => I don't think that this is a good hint.. maybe you have a concrete wording in mind
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6782#discussion_r2778526602
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6782/review/3768835580 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260207/2bd80d60/attachment.htm>
More information about the rails-dev
mailing list