Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow loading dark tiles #42

Closed
hlfan opened this issue Nov 20, 2024 · 5 comments
Closed

Allow loading dark tiles #42

hlfan opened this issue Nov 20, 2024 · 5 comments

Comments

@hlfan
Copy link

hlfan commented Nov 20, 2024

Implementing dark mode tiles in openstreetmap/openstreetmap-website#5328 requires expanding the layer definitions in leaflet-osm.js.
A possible solution is to add suffixes in the URLs based on a flag in the options.
For the current two layers that have dark mode variants, this could be achieved by adapting a few keys in the options objects.

Updating the tests would also be required.

@AntonKhorev
Copy link
Contributor

Why can't their dark variants have another url like https://github.com/openstreetmap/openstreetmap-website/pull/4777/files#diff-4fe14e869cf17b068e1bea009a55b094fed13f0cad85337cf4769f32b40a01b5R262 ?

@tomhughes
Copy link
Member

That does seem like a better solution to me.

@hlfan
Copy link
Author

hlfan commented Nov 21, 2024

Yes! This is much better!

@hlfan
Copy link
Author

hlfan commented Nov 21, 2024

Leaving this open as the code from the website repo may be propagated here too when an implementation gets merged.

@hlfan
Copy link
Author

hlfan commented Dec 20, 2024

Closing in favor of a more modular solution as in ebfaf22.

@hlfan hlfan closed this as completed Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants