0

I am trying to draw a track that satellite follows when revolving around earth.

I use Open Street Maps for it and Leaflet.js to integrate it with my web app.

Snippet of the JS.

var trackList15 = []
for (let trackPoint of tracks ) {
  trackList15.push([trackPoint.latitude, trackPoint.longitude])
}

When it is close to the edges of the map a horizontal line is drawn to connect the visually apart points on the map. I want to discontinue the line at the edge and draw new one from the other edge.

I haven't been able to find a way to detect edges of the map to discontinue the polyline when it is near edges.

You can see what I mean in this

map screenshot

Alexander Farber
  • 21,519
  • 75
  • 241
  • 416
mfarrukh
  • 1
  • 1

0 Answers0