Replies: 13 comments 2 replies
|
do you have the same issue with flyTo? |
|
Note: |
|
ah sorry, I mixed it up with the demo app's flyTo the demo app is calling animateTo without issue, and the pattern looks to be about the same, |
|
Yes, the issue is weird. It worked in < 0.15 and I was surprised it didn't work with nativefffi. I didn't see any obvious reason why it does not work. |
|
does it work on desktop? mlnffi landed on desktop in v0.14, then android/ios in v0.15 I'm not too surprised if some new bugs appear with mlnffi; it's essentially a ground up rewrite. But I'm unsure why the demo app doesn't repro it |
|
we also have MapCameraTransitionTest that should catch such a bug |
There is a very slight movement, very very tiny... |
|
Oh you may have found the issue with 2f5ae8c |
That can happen if some other operation causes the animation to cancel. Could you share more of the reproducing project? |
|
I managed to isolate the issue : I use // ...
val idleFrameRate = if (cameraState.isCameraMoving) null else 10
MaplibreMap(
modifier = modifier,
baseStyle = BaseStyle.Uri(POSITRON_STYLE_URL),
cameraState = cameraState,
zoomRange = 4f..18f,
options = MapOptions(
renderOptions = renderOptionsWithMaximumFps(idleFrameRate), // without this, animateTo works perfectly
) {}
// ...
// Note that I had to do expect/actual because RenderOptions has different arguments between native ios & native android
// Don't know yet if this is the case still with nativeffi, I didn't have a look yet
fun renderOptionsWithMaximumFps(maximumFps: Int?): RenderOptions =
RenderOptions(maximumFps = maximumFps) |
that's unnecessary. The map idles on its own when nothing is changing; maximumFps is just that, a maximum. |
in v0.15, RenderOptions has one actual on android/ios/desktop, and another on web. |
|
My triage agent managed to root cause this with your max fps repro. I haven't look deeply yet but it looks like:
will fix for next release. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
What happened?
cameraState.animateTo(newPosition)returns normally, butcameraState.positionnever changes, map does not move. No exception, no crash, no log output. Reproduces identically on Android and iOS.cameraState.jumpTo(boundingBox, ...)shows the same symptom (initial bounds fit never applies).Direct assignment (
cameraState.position = newPosition) works reliably as a workaround. Havingduration = Duration.ZEROworks also.Affected Platforms
Platform Version
Android 14 (physical device), iOS 17+ (simulator/device)
Library Version
0.15.0
Sample Code
All reactions