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/c2621121...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to