maplibre / maplibre-navigation-ios

MapLibre Navigation SDK for iOS
Other
36 stars 29 forks source link

Moving the map with active navigation leads to marker getting dragged off the route #27

Closed boldtrn closed 3 months ago

boldtrn commented 7 months ago

Steps to Trigger Behavior

  1. Start the example app and navigate
  2. Move the map
  3. The location marker is moved with the map and does not stay at the user's location
  4. The location flies back on the route

Expected Behavior

The marker should stay on the location of the user

Actual Behavior

It is moved away

Version(s) affected

mindthefish commented 6 months ago

With the update to MapLibre native 6.0.0 there is an issue where mapViewDidFinishRenderingFrameFullyRendered is not called in MLNMapView and therefore not in NavigationMapView. This callback seems to be needed to set the position of the userCourseView. For me it only occurs when flinging, not when slowly panning. I assume this is a problem with the MapLibre Native update? I rolled back to 5.13 and had no problems as the callback is triggered during the interaction.

https://github.com/maplibre/maplibre-navigation-ios/assets/895046/ec75ad0f-0b38-4d46-b967-b76cb007a11f

mindthefish commented 6 months ago

@boldtrn Do you see this as a maplibre-navigation issue or should we consider opening an issue at MapLibre Native? Currently this is a blocker for using the latest version.

boldtrn commented 6 months ago

I think this issue existed before the Maplibre Update as well, but maybe it was not so frequent?

Do you see this as a maplibre-navigation issue or should we consider opening an issue at MapLibre Native? Currently this is a blocker for using the latest version.

Good question, I guess this depends on if we expect this call to actually happen during the animation. My feeling is that this callback should be called and if it is not called, this is probably an issue with Maplibre itself, but I am not 100% sure.

Have you tried it Maplibre 6.3? If it still occurs with 6.3 maybe you could bring this up either as issue or discussion in the Slack?

mindthefish commented 6 months ago

6.3.0 unfortunately does not solve the problem. I opened an issue in maplibre/maplibre-native like suggested from @louwers.