stadiamaps / ferrostar

A FOSS navigation SDK built from the ground up for the future
https://stadiamaps.github.io/ferrostar/
Other
91 stars 11 forks source link

Fix breaking out from navigation camera on iOS #111

Closed Max-Leopold closed 3 weeks ago

Max-Leopold commented 3 weeks ago

Two small changes to fix breaking out from the navigation camera on iOS:

  1. Use a binding for the snapped instead of a constant to allow user to break from navigation camera.

It could be that this was done intentional to not allow breaking out from the navigation at all when using the DemoNavigationView. If so, feel free to ignore. The behavior looks quite buggy right now though because even if the user tries to move the map during navigation it will try to snap back to the user location.

  1. Drag gesture velocity can be negative. So we should check the absolute value of the gesture velocity against the breakwayVelocity.
ianthetechie commented 3 weeks ago

Hey @Max-Leopold; sorry it's taken a bit to get to this. Just getting back from some travel.

It could be that this was done intentional to not allow breaking out from the navigation at all when using the DemoNavigationView. If so, feel free to ignore. The behavior looks quite buggy right now though because even if the user tries to move the map during navigation it will try to snap back to the user location.

Haha yeah, this was just a first hackish pass for a demo app. I'll try it out and give feedback but I'm guessing this is fine.

Drag gesture velocity can be negative. So we should check the absolute value of the gesture velocity against the breakwayVelocity.

heh ;) good catch.

Unrelated: the CI error isn't your fault. There's a fix pending merge in another branch. I'll take care of that.