-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Throttle map rendering when device unplugged #370
Comments
This requires #352, because the course tracking animation built into MGLMapView can’t be disabled. |
This also depends on a fix for the general battery monitoring crash: #371 |
@1ec5 Is this something we could achieve in a first pass without a complete overhaul of course tracking, for example with a category on MGLMapView? |
Unfortunately not without changes to the map SDK proper or a risky hack. The CADisplayLink frame rate is determined by a constant. We could swizzle |
Yeah, overriding |
I agree that swizzling would be a bad idea for the reason that it would break non-NavigationMapView instances of MGLMapView. A category method override would be nondeterministic, right? Overriding in NavigationMapView would be safer, although |
This is being implemented as part of #402 but it's blocked upstream by some camera refinements. |
By the way, if we need a tightly-scoped fix for a patch release, we can override |
Unfortunately, |
I think we should continue to consider throttling when the device is unplugged, though from tests anything that involves a significant change in course (e.g. turns) looks pretty bad without animations. Could we disable animations if the device is unplugged and the change in course/heading is small (i.e. <10-15°), otherwise animate between location updates? |
Reopening as a follow on to #402. |
Right now, rendering 60fps animations between location updates is taxing on the device + battery. When the device is unplugged, we should not animate between location updates.
cc @bsudekum @1ec5
The text was updated successfully, but these errors were encountered: