-
-
Notifications
You must be signed in to change notification settings - Fork 286
Refactor base layer switch logic to use visibility toggling instead of setStyle()
#7045
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
Merged
ramyaragupathy
merged 5 commits into
develop
from
fix/7030-changing-basemap-kills-project-boundary
Nov 4, 2025
Merged
Refactor base layer switch logic to use visibility toggling instead of setStyle()
#7045
ramyaragupathy
merged 5 commits into
develop
from
fix/7030-changing-basemap-kills-project-boundary
Nov 4, 2025
+100
β29
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4c82fea to
f97b8a0
Compare
manjitapandey
approved these changes
Oct 13, 2025
β¦revents reloading the entire style and re-adding overalays
β¦` event which allows to load all base layers and toggle switch using its visibility property It helps to avoid the re-adding map style entirely so it prevents all custom layers, sources, controls, and event bindings lost
f97b8a0 to
13ded51
Compare
suzit-10
added a commit
to naxa-developers/tasking-manager
that referenced
this pull request
Nov 3, 2025
suzit-10
added a commit
to naxa-developers/tasking-manager
that referenced
this pull request
Nov 3, 2025
suzit-10
added a commit
to naxa-developers/tasking-manager
that referenced
this pull request
Nov 3, 2025
suzit-10
added a commit
to naxa-developers/tasking-manager
that referenced
this pull request
Nov 3, 2025
suzit-10
added a commit
to naxa-developers/tasking-manager
that referenced
this pull request
Nov 3, 2025
add base layers before draw
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



What type of PR is this? (check all applicable)
Related Issue
Describe this PR
This PR refactors the base map switching mechanism.
Previously, the implementation relied on
map.setStyle(style)to switch base layers. This caused the map to fully reinitialize each time the base layer was changed, resulting in loss of drawn or uploaded features (e.g., AOIs).The new approach loads both base raster layers during map initialization and toggles their visibility dynamically using
setLayoutProperty(). This makes base layer switching a fully independent operation, enabling seamless transitions between base maps without resetting the map state and ensuring that all other layers, sources, and user interactions remain unaffected.Checklist before requesting a review