1ec5 left a comment (openstreetmap/openstreetmap-website#6247)

So far we’ve been forging ahead with #6234 based on data showing that enough 
visitors to the homepage have WebGL-capable environments: 
https://github.com/openstreetmap/openstreetmap-website/issues/6234#issuecomment-3115356831.
 However, the embed page has a broader audience that might have lower WebGL 
prevalence. @pnorman, would you be able to run the numbers on the embed page 
just in case?

Regardless, I still suspect there’s enough of a benefit to being able to 
support all the featured layers that we should attempt to support sharing the 
vector layers somehow. I see a few different options, in order of personal 
preference:

1. Rewrite embed.js.erb to replace leaflet-osm with MapLibre. If [MapLibre 
detects that WebGL is 
unsupported](https://maplibre.org/maplibre-gl-js/docs/examples/check-if-webgl-is-supported/),
 fall back to a basic Leaflet map in the same page that doesn’t rely on 
leaflet-osm. Enable the embed page for every layer.
2. Write a separate MapLibre-powered embed page to sit alongside 
[embed.js.erb](https://github.com/openstreetmap/openstreetmap-website/blob/master/app/assets/javascripts/embed.js.erb).
 Try to wean the latter page off of leaflet-osm. If MapLibre detects that WebGL 
is unsupported, redirect to the Leaflet-powered page. Connect the share panel 
to a different embed page depending on the layer, even if that results in 
differing behavior.
3. Rewrite embed.js.erb to replace leaflet-osm with MapLibre. If MapLibre 
detects that WebGL is unsupported, fall back to a basic message about WebGL 
support.

@hlfan @CommanderStorm, can you think of any other options? Do you think the 
size of MapLibre compared to Leaflet would strongly push us toward option 2 
instead of option 1? Can we get away with option 3 without much pushback from 
Web developers?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/6247#issuecomment-3849017620
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/issues/6247/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to