-
Notifications
You must be signed in to change notification settings - Fork 150
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
Add enum for layer position #221
Conversation
8722be7
to
1935ca5
Compare
cc @tobrun |
let annotationManager = AnnotationManager(for: mapView, | ||
mapEventsObservable: mapView.mapboxMap, | ||
with: self) | ||
with: self, | ||
options: AnnotationOptions(layerPosition: .at(requiredIndex))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we need another test that specifically adds an annotation above location indicator Layer or vice-versa. And then we can get the stack and check for the order there as the assertion. That was a specific use case and would be an impactful test.
Further, this PR is going to warrant a Migration Guide change. Can we make that and link that PR as part of this ticket somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we address this with upcoming annotation changes? /cc @nishant-karajgikar?
PRs must be submitted under the terms of our Contributor License Agreement CLA.
Pull request checklist:
mapbox-maps-ios
changelog:<changelog>Added new LayerPosition enum which improves Swift ergonomics.</changelog>
.Summary of changes
This PR adds a
LayerPosition
enum that shadows the underlyingMapboxCoreMaps.LayerPosition
struct to improve the Swift ergonomics of function calls.For example, the layerPosition parameter in the following function call
becomes