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
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Camera updates get called even when the maps camera's already there. #7295
While looking into whether the same behavior described in #7119 exist on Android also, I noticed we aren't checking whether the camera is already at the position requested. For example, when I call animateCamera to move the camera to a new position, and once the animation ends, call it again using the same position, we are still making a call to nativeFlyTo.
This should be feasible to add, check if the current camera position in Transform.java isn't the same as the newly set one. Note that LatLng values rely on double and you can have some floating point issues.
eg. moving a camera object to Latitude 37 can result in getting 36.99999999999.
I see 2 solutions for this:
we compare 2 LatLngs with a delta
we store previous set camera position from a CameraUpdateFactory method and decouple it from the current cameraPosition found in Transform (this one is being recreated from core).
Activity
tobrun commentedon Dec 6, 2016
This should be feasible to add, check if the current camera position in
Transform.javaisn't the same as the newly set one. Note that LatLng values rely on double and you can have some floating point issues.eg. moving a camera object to Latitude 37 can result in getting 36.99999999999.
I see 2 solutions for this:
CameraUpdateFactorymethod and decouple it from the current cameraPosition found inTransform(this one is being recreated from core).