[openstreetmap/openstreetmap-website] Fix map blink when active Mapnik + some overlay (PR #5570)
Anton Khorev
notifications at github.com
Wed Jan 29 09:33:54 UTC 2025
When the layers parameter `layers=` is empty (or doesn't exist), it could mean one of two things:
- keep currently enabled layers
- reset to default layers (standard base + no overlays)
osm-website's code is undecided about this:
- `map.setState` behaves as if it wants to keep the currents layers because it won't call `updateLayers` when `state.layers` are empty. `state.layers` are populated with the layers param elsewhere
- `OSM.formatHash` behaves as if empty value means standard layer because it removes `M`. Removing `M` doesn't always produce empty layers param because of overlay codes, and that's why this PR was opened.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5570#issuecomment-2621121469
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5570/c2621121469 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250129/7ca284b1/attachment-0001.htm>
More information about the rails-dev
mailing list