How to have two worlds in leaflet?

Viewed 184

I have a problem with leaflet when it come to have point near W180. The problem is the same as this one : https://github.com/Leaflet/Leaflet/issues/82

But on marine traffic we can see exactly what I try to achieve.

enter image description here

A continuous world where -180 W will cross this section so I can have a polyline which is not cut and rendered on the other side.

How is it possible since leaflet is able to have greater longitude than 180 ? I've been in the dark on this issue for some time.

I first tried to remove the worldcopyjump and the maxbounds but I don't know how to have two maps at the same time and how to avoid the polyline being cut.

enter image description here


EDIT

I've been looking through the mtMap object on https://www.marinetraffic.com with one boat and there are using this settings :

center: [16.46769474828897, 216.73828125],
maxBounds: [[150,540],[-150,-540]],

My guess is that here are not using negative longitude, so maybe the solution is to have only positive longitude (greater than 180) ?

0 Answers
Related