Closed KiwiKilian closed 1 year ago
same here, please Mapbox team
Likely caused by mapbox 10.9.0 it seems that it needs androidx.asynclayoutinflater:asynclayoutinflater:1.0.0
, but event after adding that marker views seems to be missing.
any temp solution @mfazekas ?
I need get it running asap
@KiwiKilian Is this the case with this example too?
Yes, same for this example. Now using Beta 55.
That’s not good! Let me look into this today.
It fails at the transition from d67afdc1222cac3546aa2c0d2e49cdfde1701960 to aba4f337b70fd1f14a8910d6b275ff8eee632941, which is where the Mapbox version gets updated, as @mfazekas said.
I've been looking into it for a while, and I can't see how it's something that we're doing. The best I have is that it's something that's changed with how view annotation layering and visibility are handled (PR and line of code).
Simply downgrading the SDK in build.gradle
resolves the issue:
- implementation 'com.mapbox.maps:android:10.9.0'
+ implementation 'com.mapbox.maps:android:10.8.0'
I haven't tested a fresh Android project for lack of time. But I just don't know what else to try.
What do you all think?
Maybe you could try v10.10.0-beta.1?
If the version change fixes it, it pretty much looks like a upstream bug.
try v10.10.0-beta.1?
I did. :) Doesn't work. Same as 10.9.0.
It fails at the transition from d67afdc to aba4f33, which is where the Mapbox version gets updated, as @mfazekas said.
I've been looking into it for a while, and I can't see how it's something that we're doing. The best I have is that it's something that's changed with how view annotation layering and visibility are handled (PR and line of code).
Simply downgrading the SDK in
build.gradle
resolves the issue:- implementation 'com.mapbox.maps:android:10.9.0' + implementation 'com.mapbox.maps:android:10.8.0'
I haven't tested a fresh Android project for lack of time. But I just don't know what else to try.
What do you all think?
Let me try that version android
@KiwiKilian it's still not working
@vadim312 you changed the line to implementation 'com.mapbox.maps:android:10.8.0'
and rebuilt the project?
Yes, I did, ./gradlew clean && yarn android
@vadim312 make sure you kill the bundler, delete and reinstall node modules, etc. If it still doesn't work, can you try cloning from this commit?
d67afdc1222cac3546aa2c0d2e49cdfde1701960
If that doesn't work, I'm not really sure where to go from there, because that's prior to this upgrade.
It fails at the transition from d67afdc to aba4f33, which is where the Mapbox version gets updated, as @mfazekas said.
I've been looking into it for a while, and I can't see how it's something that we're doing. The best I have is that it's something that's changed with how view annotation layering and visibility are handled (PR and line of code).
Simply downgrading the SDK in
build.gradle
resolves the issue:- implementation 'com.mapbox.maps:android:10.9.0' + implementation 'com.mapbox.maps:android:10.8.0'
I haven't tested a fresh Android project for lack of time. But I just don't know what else to try.
What do you all think?
Good, it's working!
@TianFengRL I've tried to change android gradle mapbox version but it didn't work. how did you make it work? appreciate to guide me details. thanks
@vadim312 Using non default mapbox version Add this in your android/build.gradle > buildscript > ext RNMapboxMapsLibs = { // optional - only required if you want to customize it implementation 'com.mapbox.maps:android:10.8.0' implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:6.8.0' }
Ok, it works but got another issue as map component keeps rerendering
I was able to make the MarkerViews show up on 10.9. See #2385
My understating of the cause of the issue is that in mapbox the annotation views parent (container) is a view that should have the same size as the map view itself. (this container is child of the map view). It seems that whatever mechanism used by mapbox to layout the container, doesn't work in ReactNative environment, and it's size is w=0,h=0. So now I'm manually changing the size.
So that issue seems to be fixed, but there is a crash when closing a map view with annotations
com.mapbox.maps.MapboxViewAnnotationException: Cannot get annotation options for id: '42', it does not exist.
at com.mapbox.maps.ViewAnnotationManagerImpl.prepareViewAnnotation$lambda-6(ViewAnnotationManagerImpl.kt:563)
at com.mapbox.maps.ViewAnnotationManagerImpl.$r8$lambda$h-8qPi_VGvrrOLG6FgtIoOywDiM(Unknown Source:0)
at com.mapbox.maps.ViewAnnotationManagerImpl$$ExternalSyntheticLambda1.onDraw(Unknown Source:6)
at android.view.ViewTreeObserver.dispatchOnDraw(ViewTreeObserver.java:1132)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:4352)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:4149)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3309)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2126)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8653)
Mapbox Implementation
Mapbox
Mapbox Version
10.9.0
Platform
Android
@rnmapbox/maps
version10.0.0-beta.54
Standalone component to reproduce
This is simply the
examples/Annotations/MarkerView.js
:Observed behavior and steps to reproduce
MarkerView
is not displayed anymore on Android. I think it has begun between Beta 48 and 49, maybe after 49.Furthermore
allowOverlap
,isSelected
andanchor
are now required props.Expected behavior
No response
Notes / preliminary analysis
No response
Additional links and references
No response