-
Notifications
You must be signed in to change notification settings - Fork 117
Invalidate onCameraMove as part of tracking animation #395
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
Conversation
| * @since 0.1.0 | ||
| */ | ||
| public final class LocationLayerPlugin implements LifecycleObserver { | ||
| public final class LocationLayerPlugin implements LifecycleObserver, OnCameraMoveInvalidateListener { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nicer to have an anonymous inner class so we don't add unnecessary public methods to the LocationLayerPlugin api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OnCameraMoveInvalidateListener is package private, I don't see the issue here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cammace When implementing an interface we are unnecessary exposing LocationLayerPlugin#onInvalidateCameraMove. Making it an anonymous inner class hides that method.
LukasPaczos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to call onCameraMoveInvalidateListener.onInvalidateCameraMove(); for LocationLayerCamera#setBearing as well.
Additionally, it'd be great to optimize LocationLayerPlugin#onCameraMove not to update when unnecessary, for ex. we don't need to update accuracy radius when zoom has not changed etc. This might help with table overflow issues we've seen recently.
| * @since 0.1.0 | ||
| */ | ||
| public final class LocationLayerPlugin implements LifecycleObserver { | ||
| public final class LocationLayerPlugin implements LifecycleObserver, OnCameraMoveInvalidateListener { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cammace When implementing an interface we are unnecessary exposing LocationLayerPlugin#onInvalidateCameraMove. Making it an anonymous inner class hides that method.
|
I've moved the implementation into a private variable and fixed it not getting invoked inside |
LukasPaczos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Closes #391
cc @danesfeder @LukasPaczos