Skip to content
Discussion options

You must be logged in to vote

How does your PositionConverter work? I assume it's converting the lat/long into single-precision (32 bit) floats, which are inherently imprecise at the scale of earth lat/lon. Last I checked, Compose doesn't have animation helpers that operate on double-precision (64 bit) floats.

You could mitigate the floating point imprecision somewhat by offsetting the lat/lon so the numbers are closer to zero (essentially, lat/lon relative to some point near where you're animating). This is known as a "floating origin".

Or perhaps animate some tweening value between 0-1, and use that value to transform the point along its path (origin at 0, destination at 1).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MarcoSanz12
Comment options

Answer selected by MarcoSanz12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants