> But I found it too hacky to overwrite the class's properties from the 
> instance each time, and I especially wanted to avoid using `__proto__`. Yet I 
> couldn't find a way to do that.

I don't see any reason why what I was suggesting would need any of that but 
I've actually come up with a better solution now.

What really bothered me was having the URL sometimes in leaflet-osm and 
sometimes here, so what I've done is to add a new `TransportDarkMap` layer to 
leaflet-osm in 
https://github.com/openstreetmap/leaflet-osm/commit/ebfaf22426c265aaf3f401d70ffd02ca920623c9.

So now we can have a `leafletOsmDarkId: "TransportDarkMap"` key in `layers.yml` 
and if that key exists we construct that layer instead of the normal one and 
then don't do any filtering.

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

Message ID: 
<openstreetmap/openstreetmap-website/pull/5397/c2551365...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to