-
Notifications
You must be signed in to change notification settings - Fork 157
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
[style] Improve update layer support #85
Merged
Merged
Conversation
This file contains 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
nishant-karajgikar
added
the
feature 🍏
When working on a new feature or feature enhancement
label
Feb 5, 2021
julianrex
reviewed
Feb 6, 2021
nishant-karajgikar
force-pushed
the
nishantk/update-layer-support
branch
from
February 10, 2021 03:20
1c2c383
to
55aecb3
Compare
nishant-karajgikar
force-pushed
the
nishantk/update-layer-support
branch
from
February 17, 2021 17:46
55aecb3
to
e97acee
Compare
nishant-karajgikar
changed the title
[style] [wip] Improve update layer support
[style] Improve update layer support
Feb 17, 2021
Codecov Report
@@ Coverage Diff @@
## main #85 +/- ##
===========================================
- Coverage 77.16% 48.93% -28.23%
===========================================
Files 101 101
Lines 5658 5683 +25
===========================================
- Hits 4366 2781 -1585
- Misses 1292 2902 +1610
Flags with carried forward coverage won't be shown. Click here to find out more.
|
nishant-karajgikar
force-pushed
the
nishantk/update-layer-support
branch
from
February 17, 2021 18:18
2536050
to
02ccc29
Compare
julianrex
approved these changes
Feb 17, 2021
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.
PRs must be submitted under the terms of our Contributor License Agreement CLA.
Pull request checklist:
mapbox-maps-ios
changelog:<changelog>Allow a developer to synchronously update a layer with one API call -- no longer have to retrieve and re-add a layer.</changelog>
.Summary of changes
This PR improves the way layers can be updated by introducing a new
updateLayer()
method which accepts a closure as a parameter. The method takes care of retrieving the layer from the style, passing it to the mutating closure, then applies the changes to the style.User impact (optional)
Updating a layer is much simpler now: