Qt 6.11 is out! See what's new in the release
blog
Create un MapRectangle crossing the antimeridian
-
I am experiencing an issue with MapRectangle / MapPolygon in Qt Location when the geometry crosses the antimeridian (180° longitude).
Example:
MapRectangle { id: testRect topLeft { latitude: 86.45 longitude: 167.65 } bottomRight { latitude: 14.92 longitude: -40.73 } }The rectangle is rendered incorrectly and appears to wrap around the globe in the wrong direction. The longitude interpretation seems inverted.
I also tried using MapPolygon:
MapPolygon { path: [ QtPositioning.coordinate(86.45, 167.65), QtPositioning.coordinate(86.45, -40.73), QtPositioning.coordinate(14.92, -40.73), QtPositioning.coordinate(14.92, 167.65) ] }but the polygon is still rendered incorrectly.
Does Qt Location officially support polygons/rectangles crossing the antimeridian?
Is splitting the geometry into two polygons the only reliable workaround?
Qt version: 6.10
Any guidance would be appreciated.