-
Notifications
You must be signed in to change notification settings - Fork 140
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
[Annotation plugin] Make getting annotation manager configurable. #47
Conversation
app/src/main/java/com/mapbox/maps/testapp/examples/annotation/CircleActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/mapbox/maps/testapp/examples/annotation/SymbolActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/mapbox/maps/testapp/examples/annotation/SymbolActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/mapbox/maps/testapp/examples/annotation/Utils.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/mapbox/maps/testapp/examples/annotation/Utils.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/mapbox/maps/testapp/examples/annotation/Utils.kt
Outdated
Show resolved
Hide resolved
style.addLayer(layer) | ||
} else { | ||
style.addLayerBelow(layer, belowLayerId) | ||
if (layer == null || source == null) { |
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.
Just to confirm - we recreate source
even it was not null
but layer == null
. Is it expected behavior?
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.
layer and source are created at the same time, here check them both just a double confirm.
literal(true) | ||
) | ||
) { features -> | ||
features.value?.let { featureList -> |
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.
If feature.value == null
- we will not call callback.onQueryAnnotation(null)
. Is it expected behavior?
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.
Yes, everywhere get the result will check null. Have thought about it, it seems we don't need the callback interface to return a nullable result.
sdk-base/src/main/java/com/mapbox/maps/plugin/annotation/AnnotationConfig.kt
Outdated
Show resolved
Hide resolved
*/ | ||
data class AnnotationConfig( | ||
/** The id of the layer above the annotation layer*/ | ||
val belowLayerId: String? = null, |
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.
The doc states that id of the layer above the annotation layer
while val is named belowLayerId
🤔
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.
We will add the annotation layer below the given layer, which is the same as the definition in Layer
plugin-annotation/src/main/java/com/mapbox/maps/plugin/annotation/AnnotationManagerImpl.kt
Show resolved
Hide resolved
0f9c824
to
63b3cca
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.
@Chaoba - great job, LGTM!
Also please add changelog entry to PR description.
PRs must be submitted under the terms of our Contributor License Agreement CLA.
Pull request checklist:
mapbox-maps-android
changelog:<changelog>Make getting annotation manager configurable</changelog>
.Summary of changes
In this pr:
User impact (optional)