I have created view annotations on the Android Native MapView with Android Native MapBox SDK. It is running fine in the Android Native app.
Now when I port over that code and view implementation to the Flutter app using PlatformView, I face the annotation clipping as shown in the attached video. There are no invisible/hidden/transparent views in front of MapView.
Does anyone have idea what could be the issue here? This has to do something with the Flutter side as Native Android app has no such issues. Still you can suggest anything that could be performed on native android side to fix the issue.
The code to load the view annotations is as below
val options = viewAnnotationOptions {
geometry(point)
allowOverlap(true)
anchor(ViewAnnotationAnchor.BOTTOM)
}
val viewAnnotation = viewAnnotationManager.addViewAnnotation(
// Specify the layout resource id
resId = R.layout.layout_marker_view,
// Set any view annotation options
options = options
)
Any kind of help is appreciated! Thanks.
The issue here is the platform view does not render the
SurfaceView
properly.So you need to switch to
TextureView
using theMapInitOptions
.