[openstreetmap/openstreetmap-website] Fix map blink when active Mapnik + some overlay (PR #5570)
Roman Deev
notifications at github.com
Wed Jan 29 00:05:44 UTC 2025
#5474 added an unpleasant blink when an overlay is enabled, and you try to close the sidebar:
https://github.com/user-attachments/assets/4d3063b9-dd39-4553-844b-e2bd99c11241
This is because `var layers = layerParam || "M";` does not add `M` when overlay is enabled (`layerParam` is not empty). I added a check that if Mapnik is the current layer, then we add its code, so that`.removeLayer () ' was not called for it.
Checking `this.getMapbaslaver() &&` is important because when opening the tab it can return undefined.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/5570
-- Commit Summary --
* fix map blink when active Mapnik + some overlay
-- File Changes --
M app/assets/javascripts/leaflet.map.js (3)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/5570.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5570.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5570
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5570 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250128/bb137d7f/attachment.htm>
More information about the rails-dev
mailing list