[openstreetmap/openstreetmap-website] Support client-side rendered featured layers (#2686)

Tuukka Hastrup notifications at github.com
Fri Jul 29 08:47:52 UTC 2022


> Looks like https://github.com/sgiehl/piwik-plugin-DeviceFeatureWebGL will track webgl support which will get us the data needed to make an informed decision.

This is the library that MapLibre uses to check whether the browser supports what is needed, including specific WebGL and JavaScript features: https://github.com/mapbox/mapbox-gl-supported

> My preference is for the first option, mainly for code complexity reasons. The latter would require our leaflet integration, a maplibre integration, and logic to switch between them. But making this decision isn't my call, it's a maintainer decision.

Could a simple integration using maplibre-gl-leaflet work as an upgrade path to consider? Like this: Load the Leaflet map as usual by default. Only if/when the user selects a client-side rendered layer (a vector background layer or features), load maplibre-gl-leaflet and MapLibre code dynamically and add it as a layer to the Leaflet map. The downside is a little less performance caused by how maplibre-gl-leaflet works. As an upside, this shouldn't require big changes to the existing code or much new code. https://github.com/maplibre/maplibre-gl-leaflet

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

Message ID: <openstreetmap/openstreetmap-website/issues/2686/1199031462 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220729/d535c45c/attachment-0001.htm>


More information about the rails-dev mailing list