Big location pointer on Android Auto
Environment
Android OS version: 14, 13 Devices affected: SM-S908B, SM-S901B Maps SDK Version: 10.16.6-SNAPSHOT.0306T1139Z.764ecaa
Observed behavior and steps to reproduce
Users are facing issue of seeing big location pointer on android auto randomly when opening the app. This goes away when they switch to some another app and then come back
https://github.com/user-attachments/assets/2aa45b2c-3598-43ce-8c85-1d5826db832b
Expected behavior
The pointer should be shown in a small size as is normally displayed.
Notes / preliminary analysis
We followed the same step to add the location puck as mentioned in the documentation but still the issue does seem to occur randomly. Have added the code below of how we are adding the location puck
mapboxMap?.getStyle {
val drawable = ContextCompat.getDrawable(context, R.drawable.mapbox_user_puck_icon)
surface?.mapSurface?.location2?.updateSettings2 {
puckBearingEnabled = true
puckBearingSource = COURSE
}
surface?.mapSurface?.location?.locationPuck = LocationPuck2D(bearingImage = drawable)
}
Hi @AkshatDubey10 , could you try out the latest Maps SDK v11 instead? We have fixed a few issues since then that might impact your use case.
Hi @pengdev, we are currently on Mapbox SDK Version - 10.18.2 For updating to v11, we will require some time which won't be possible for us at the moment. If possibile, can we add the fix in v10 as it will be easier
Hi @pengdev, we have updated the mapbox to version 11.8.1, but the issue still persists on the android auto device. Some info which might help you replicate the issue is, firstly force stop the app from the phone and then open the app on the android auto device this helps to replicate the issue on our end. Have attached the image for reference
Hey @pengdev, do we have some update on this as more users are facing this issue
Hi @AkshatDubey10 I have filed an internal ticket for our team to look deeper. In the mean time, could you share how you configured the location puck style with Maps SDK v11? Something like our example here? I had the impression that you should use carContext to get the drawable to have the correct pixel ratio for the car's display.
Hey @pengdev here is the code I am using to show the location puck on android auto
mapboxMap?.getStyle { surface?.mapSurface?.location?.locationPuck = LocationPuck2D( topImage = ImageHolder.from(R.drawable.mapbox_user_puck_icon), shadowImage = ImageHolder.from(R.drawable.mapbox_user_stroke_icon), ) }
I think its similar to the example you have given
Also when this happens the map zoom also affects even if I try to zoom in with level 16 it will remain zoomed out
Hi @pengdev, is there any update on these issue ?
We are also facing issue when the map is zoomed out even re-centering with default zoom level(16 in our case) does not work.
Hey @pengdev , did you guys have a fix for this issue ?
Hi @pengdev, did you guys manage to fix the issue ?