-
Notifications
You must be signed in to change notification settings - Fork 149
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
Support annotation view lookup by id. #1512
Support annotation view lookup by id. #1512
Conversation
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 wonder if we should add a convenience method to update(remove to a lesser extent as well) a view annotation with id now when we allow passing custom id when adding a view annotation.
This change is requested in the context of making it easier to change a view annotation, so this addition, while being very cheap to us, might make this use case a bit more convenient.
E.g.:
// it is possible to get a view and update options for it currently
if let view = view(forId: id) {
manager.update(view, options)
}
// with a convenience method this could be a single invocation
manager.update(forId: id, options)
// the convenience method
public func update(forId id: String, options: ViewAnnotationOptions) throws {
guard let view = view(forId: id) else {
throw ViewAnnotationManagerError.annotationNotFound
}
update(view, options: options)
}
I wanted to do the same, but I want to clarify some design intention behind the current |
- Allow adding annotation view with a custom id, that can be used later to look it up.
a1ec8a8
to
a0c39a6
Compare
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.
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.
* Update version numbering (#1499) * Remove binary dependency on MME (#1510) * Remove binary dependency on MME * Add changelog * Mai/prepare v10.13 (#1511) * Bump CoreMaps to v10.13.0 and Common to v23.5.0 * Update CHANGELOG.md * Remove carplay entry from changelog --------- Co-authored-by: Patrick Leonard <pjleonard37@users.noreply.github.com> Co-authored-by: Roman Gardukevich <roman.gardukevich@mapbox.com>
Pull request checklist:
## main
heading near the top).PRs must be submitted under the terms of our Contributor License Agreement CLA.