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
We use a state var to switch the Puck2D's bearing mode between nil and heading. We also use a custom LocationProvider/HeadingProvider, which we set during onAppear via the MapProxy, e.g. mapProxy.location!.override(provider: ourProvider). Our custom provider is a singleton instance.
When the puck bearing state variable is changed, we have to call LocationManager.override(provider:) again or it seems to reset to the default.
Expected behavior
We should only need to call LocationManager.override(provider:) once.
Notes / preliminary analysis
We can tell the provider is being reset because removeLocationObserver is being called when this puck bearing value is updated, and no subsequent call to addLocationObserver is received. We also change location accuracy filter settings on our provider when changing this puck bearing value, and those filters are not being respected unless we make another call to the override.
I am guessing this has to do with how the location manager handles the conversion from the provider to the Signal that it appears to use internally.
Additional links and references
Can provide a minimal example if needed.
The text was updated successfully, but these errors were encountered:
Environment
Observed behavior and steps to reproduce
We use a state var to switch the
Puck2D
's bearing mode betweennil
andheading
. We also use a customLocationProvider
/HeadingProvider
, which we set duringonAppear
via theMapProxy
, e.g.mapProxy.location!.override(provider: ourProvider)
. Our custom provider is a singleton instance.When the puck bearing state variable is changed, we have to call
LocationManager.override(provider:)
again or it seems to reset to the default.Expected behavior
We should only need to call
LocationManager.override(provider:)
once.Notes / preliminary analysis
We can tell the provider is being reset because
removeLocationObserver
is being called when this puck bearing value is updated, and no subsequent call toaddLocationObserver
is received. We also change location accuracy filter settings on our provider when changing this puck bearing value, and those filters are not being respected unless we make another call to the override.I am guessing this has to do with how the location manager handles the conversion from the provider to the
Signal
that it appears to use internally.Additional links and references
Can provide a minimal example if needed.
The text was updated successfully, but these errors were encountered: