-
Notifications
You must be signed in to change notification settings - Fork 131
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 feature id to annotations; prepare showcase of callout annotations #994
Conversation
sdk-base/src/main/java/com/mapbox/maps/plugin/annotation/Annotation.kt
Outdated
Show resolved
Hide resolved
sdk-base/src/main/java/com/mapbox/maps/plugin/annotation/Annotation.kt
Outdated
Show resolved
Hide resolved
plugin-annotation/src/main/java/com/mapbox/maps/plugin/annotation/AnnotationManagerImpl.kt
Show resolved
Hide resolved
The iOS SDK has used the annotation id as the feature ID since v10.0.0: https://github.com/mapbox/mapbox-maps-ios/blob/v10.0.0/Sources/MapboxMaps/Annotations/Generated/PointAnnotation.swift#L25 It defaults the IDs to a UUID string, but developers can provide any string they like: https://github.com/mapbox/mapbox-maps-ios/blob/main/Sources/MapboxMaps/Annotations/Generated/PointAnnotation.swift#L45 Some alignment questions:
Overall, I like the concept. |
@macdrevx thanks for looking into it! At the same time we can't re-use To sum up, at least from my understanding, perhaps there's no need to even add anything on iOS then. It would be nice to prepare similar example to show users how to use point annotation with an icon with view annotation but no need to align on |
Sounds good to me. Could you open a ticket for iOS to add the example? cc: @endanke is that something you could do? |
Summary of changes
Expose unique feature identifier for all annotations created by annotation plugin. This feature id is used when preparing a
Feature
that backs up annotation. This feature id could now be used to connect annotation with view annotation.Prepare an example of annotation usage (drawing a marker) and associated view annotation.
device-2021-12-15-093611.mp4
User impact (optional)
Pull request checklist:
@JvmOverloads
,@file:JvmName
, etc).mapbox-maps-android
changelog:<changelog>Expose unique annotation feature identifier that could be used to link view annotation to any annotation.</changelog>
.v10.[version]
release branch fix / enhancement, merge it tomain
firstly and then port tov10.[version]
release branch.Fixes: < Link to related issues that will be fixed by this pull request, if they exist >
PRs must be submitted under the terms of our Contributor License Agreement CLA.