lon = lat = 0
zoom_start = 1
m = folium.Map(location=[lat, lon], zoom_start=zoom_start)
kw = {'opacity': 1.0, 'weight': 4, 'color': 'red'}
folium.PolyLine(
locations=[(2, 179), (2, -179)],
popup='Wrong',
**kw,
).add_to(m)
kw.update({'color': 'blue'})
l1 = folium.PolyLine(
locations=[(-2, 179), (-2, 181)],
popup='Correct',
**kw,
).add_to(m)
kw.update({'color': 'green'})
l2 = folium.PolyLine(
locations=[(-6, -179), (-6, 179)],
popup='Correct',
**kw,
).add_to(m)
kw.update({'color': 'orange'})
l3 = folium.PolyLine(
locations=[(12, -179), (12, 190)],
popup='Artifact?',
**kw,
).add_to(m)
m.save(os.path.join('results', 'DateLineExample.html'))
m