You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: recenter doesn't immediately take effect (maplibre#53)
* Fix: recenter doesn't immediately take effect
Note: I only ever reproduced the bug in the context my app, which uses
this library via Ferrostar, while using the CoreLocationProvider, not
the SimulatedLocationProvider. But I expect this to be an issue for
anyone using this API.
To reproduce the bug in my app:
Setup: (all of this is working more or less as expected):
- While stationary (not sure if this is required)
- start a route
- see the user location puck and map centered on my location on the
ground.
- pan the map off the route
- see the user location puck disappear, but you still see the smaller location
indicator on the map. (as expected)
- see the "recenter me" button appear
- tap the "recenter me" button
Now here's the problem:
At this point I'm expecting the map to recenter with the user location
puck on my location on the ground.
But instead, I see the user location puck centered at the *current* map
position - where I'd previously panned to, *not* at my location on the ground.
Interestingly, if you'd repeat the process at this point - panning and
then re-tapping the "center me" button, it would *work* this second time.
---
The new behavior is definitely an improvement. However, if you've zoomed
way out while exploring the map away from your route, there is a
slightly noticeable two-part action while we wait for the new completion
block - first re-centering and then zooming. It's unquestionably better
than the current behavior though.
* Fixes from @hactar's branch
* Disable swiftformat andOperator (see maplibre#54)
* Fix inadvertent regression; update CHANGELOG
---------
Co-authored-by: Ian Wagner <[email protected]>
0 commit comments