-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[android] rotated map returns incorrect bounds when going over date line #11309
[android] rotated map returns incorrect bounds when going over date line #11309
Conversation
@osana could you retarget this branch to release-boba? Capturing from chat that we should avoid cherry-picking every commit, treat release-boba as the master branch for now. |
ceb92c8
to
5902bc1
Compare
923ca5c
to
c4e7aeb
Compare
25c2e02
to
10b77e6
Compare
10b77e6
to
6f28867
Compare
@tobrun I tested it interactively using a test program but I am not sure how to write a unit test for it. |
@osana the best way to test this is through an Android instrumentation test. some pseudo code: @RunWith(AndroidJUnit4.class)
public class SomeTest extends BaseActivityTest {
@Override
protected Class getActivityClass() {
return EspressoTestActivity.class;
}
@Test
public void test() {
validateTestSetup();
invoke(mapboxMap, (uiController, mapboxMap) -> {
// set camera bearing with CameraUpdateFactory.bearingTo
// if needed use waitloop() to wait for a render
// get bounds from the map and assert
});
}
} |
@tobrun I might be just hitting some other bugs. Yesterday I sort of went the same route you are suggesting. Added a test to MapboxMapTest.java
The output that I was getting was not taking dateline into account. I suspect that CameraUpdate might be interpreting LatLngBounds incorrectly - I still need to confirm that though. Also I need to figure out what is the reasonable error as bounds will be different when rotated. |
No description provided.