Controlling lines curvnes on a livemap with flat parameter.

Parameter flat is a replacement for the deprecated geodesic parameter of the livemap layer.
Layers that support this parameter: geom_segment(), geom_path():

  • False (by default) - allows a line to get geodesic;
  • True - keeps a line straight.
In [1]:
from lets_plot import *
In [2]:
LetsPlot.setup_html()
In [3]:
data = {
    'lon': [-73.7997, -149.9002],
    'lat': [40.6408, 61.2180],
}
In [4]:
ggplot(data, aes(x='lon', y='lat')) + \
    geom_livemap() + \
    geom_path(flat=True, color='red')
Out[4]:
In [5]:
ggplot(data, aes(x='lon', y='lat')) + \
    geom_livemap() + \
    geom_path(flat=True, color='red') + \
    geom_path(flat=False, color='blue')
Out[5]: