Skip to content

Conversation

@lucas42
Copy link
Contributor

@lucas42 lucas42 commented Aug 2, 2025

Problem this solves

When a line crosses the antimeridian (ie the 180th meridian), the default leaflet behaviour is to draw the line going the other way around the world. For example, San Francisco to Tokyo is drawn like so:
image

This change will now draw that same journey using the shorter route, across the Pacific Ocean:

image

Fixes #157

Implementation

Caveats

  • Leaflet.Antimeridian hasn't been update since 2017, so is unlikely to receive ongoing support.
  • I've never written any vue or leaflet before attempting this. If anyone wants to review the module I wrote, I'm happy to take feedback on that too.

Reason for doing this

To be fully honest, I only did this because I recently completed a round-the-world trip and I wanted to make a nice map of my journey so I can brag on social media:
image

lucas42 added 2 commits August 2, 2025 18:09
…hich pass the antimeridian

Installs module `vue-leaflet-antimeridian` and uses its version of LPolyline, instead of the native leaflet version.
Fixes owntracks#157
…ndencies differently, to avoid Docker build issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Location history line wrong way round when crossing the 180th meridian

1 participant