As you may know, in the map widget, the end-user can scroll horizontally and vertically, by just grabbing a point on the map widget and dragging it to the desired position. Zoomed out, scrolling horizontally, you'll view the entire globe.
This how to article shows a small application with a route sailing across the globe. A set of waypoints with legs make up a route for sailing across the globe. By scrolling horizontally, the route adapts dynamically to the visible part of the map widget.
For instance, the app opens with the following map widget:
After scrolling to the other side of the planet, the sailing route is shown as follows: