CoordinateBounds incrorrect across antimeridian
Environment
- Android OS version: Android 13 ( API level 33 )
- Devices affected: All tested
- Maps SDK Version: 10.8.1, 10.11.2
Observed behavior and steps to reproduce
- When attempting to set the camera to bounds spanning antimeridian, the opposite span is produced
Expected behavior
- The western longitude is at the left of the map and the eastern longitude is at the right of the map.
Notes / preliminary analysis
I am filing this against android as i'm currently developing on android, but I suspect this issue is lower in the native code. I did not file the issue against the archived native repo, but am happy to do so.
( the following coordinate pairs all list longitude first )
We're producing a CoordinateBounds model with the following properties:
southwest: coordinates=[170.169374, -43.422486]
northeast: coordinates=[-73.97631659, 47.25437754000001]
Note that southwest is in New Zealand and northeast is in Quebec
CoordinateBounds.crossesAntimeridian() incorrectly returns false.
Further investigation gives us the following center values:
Camera center ( from cameraForCoordinateBounds() ):
Point{type=Point, bbox=null, coordinates=[48.60561894499986, 2.1347870554087365]}
CoordinateBounds center: Point{type=Point, bbox=null, coordinates=[48.60561894500001, 1.5311597350000028]}
Our calculated center: -131.394381, 1.53116
Additional links and references
Here are the results of setting these bounds:

Here is roughly the request bounds:

hi @purdyk , this is an expected behaviour. all coordinate bounds calculations are done using a single world copy. crossing antimeridian is treated as another copy of the world.