-
Notifications
You must be signed in to change notification settings - Fork 303
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
On change of map layer, save new layer to local storage #4165
base: main
Are you sure you want to change the base?
Conversation
ddrury
commented
Jan 19, 2022
•
edited
Loading
edited
- Added a name property to each layer object.
- Added leafletjs.baselayerchange() function to the map which when it fires saves the name property to local storage.
- On page load use the stored value to set the displayed layer.
- Tidy formatting in Bing maps module (unrelated to above)
Codecov Report
@@ Coverage Diff @@
## main #4165 +/- ##
============================================
- Coverage 31.75% 31.73% -0.03%
+ Complexity 11119 11102 -17
============================================
Files 1106 1106
Lines 39106 39103 -3
============================================
- Hits 12417 12408 -9
- Misses 26689 26695 +6
Continue to review full report at Codecov.
|
e8cbc5d
to
e53cc44
Compare
e53cc44
to
ed4e614
Compare
As this PR provides a method to save a users preferred map provider and layer to local storage it mitigates the problem whereby the default layer may change depending on how the map providers are enabled/disabled in the control panel, therefore the defaultLayer concept becomes redundant and the associated code can be removed. |