-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[iOS] visibleCoordinateBounds inaccurate when longitude discontinuity around +/-180 is visible on screen #4664
Comments
There is some question as to what we should return in that case. We could return unwrapped coordinates, in which case you’d see the bounds extend beyond ±180° longitude, but that may be a breaking change: for compatibility with MapKit, this API has always used wrapped longitudes. |
MapKit returns a single point and size which avoids the issue by design and I think that's the cleanest way of doing it. I think the least breaking change to the current API would be to return wrapped coordinates. For example, if the area begins from 10 degres to the West from the discontinuity and ends at 10 degrees to the East you can return |
I like both these ideas. We could have |
Sounds good, thanks a lot. I would really appreciate it. Just to clarify, this change will make it possible that |
To recap, there are two main ways of indicating that a bounding box straddles the antimeridian:
This changed in #6088: the way to make a shape cross the antimeridian is to have one or more vertices lie beyond ±180° longitude. For consistency, you can also set The last remaining piece is to have |
Fixed in #11265, which will is in the release-boba branch for iOS SDK v4.0.0 / macOS SDK v0.7.0. |
Hello,
It seems like visibleCoordinateBounds returns longitude range of -180 degrees to 180 degrees whenever the longitude discontinuity around +/-180 is visible on screen.
Do you have any plans on handling this corner case?
SDK version: 3.2.0rc-1
Thanks,
Michal
The text was updated successfully, but these errors were encountered: