-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Incorrect MyLocationView transformation #5438
Comments
Also noticing that when compass bearing is active and we don't have a tracking mode active. That the rotate gesture is disabled, while it should be enabled. |
Noticing 2 JNI related items:
|
This occurred only when we receive a location update and were trying to animate the location update through an animator. For non-tracking behaviour we don't need to invalidate the map, we only need to invalidate the MyLocationView. |
I was wrong here because |
I fixed the |
Looking into this issue has resulted me going into the rabbit hole and finding/fixing multiple things. To limit impact/regressions for the release we are planning next week I'm going to patch up a few things and revisit this issue after release. -> simplified version of this ticket in: #5479 |
I'm running back at this issue, starting this off by cherry picking some ideas from #5468 |
…round the z-axis, notify MyLocationView when camera position changes, update test utilities.
…ject [android] #5438 - integrate MyLocationView set bearing inside the MapView setBearing [android] #5438 - invalidate the MapView instead of calling update from core. [android] #5438 - add bearing MyLocationView to setBearing focal point on MapView [android] #5438 - Get correct bearing when camera object is rotated around the z-axis, notify MyLocationView when camera position changes, update test utilities. [android] #5438 - fixes compass tracking
This ticket seems to be tracking multiple issues with the location view, If they haven't been fixed yet can we ticket them out separately and close this one @tobrun? |
Platform: Android
Mapbox SDK version: 4.1.0-beta.3
Steps to trigger behavior
MyBearingTracking.COMPASS
tracking mode.Expected behavior
Actual behavior
Discussion
The 3D transformation calculation for
MyLocationView
isM' = R(degrees) * M
usingMatrix#postRotate(float)
, whereas it should be calculated asM' = M * R(degrees)
, e.g. by usingMatrix#preRotate(float)
.MyLocationView
, similar to how tilt is, and accounted for when calculating the transformation.Camera
andMatrix
classes, whereas the entire transformation could be calculated using justCamera
and applied usingCamera#applyToCanvas(canvas)
.The text was updated successfully, but these errors were encountered: