Hi @Sipsip, welcome to the forum! px functions return a Figure object, composed of traces and layout. If you want to superimpose the scatter and the line plot you can par example do
import plotly.express as px
fig = px.scatter_mapbox(df_sample,
lat=“lat”,
lon=“lng”,
hover_name=“id”,
color=“company”,
hover_data=[“id”],
zoom=10.5,
height=500)
fig2 = px.line_mapbox(df, lat=“lat”, lon=“lng”,zoom=8)
fig.add_trace(fig2.data[0]) # adds the line trace to the first figure
fig.update_layout(mapbox_style=“carto-darkmatter”)
fig.update_layout(margin={“r”:0,“t”:0,“l”:0,“b”:0})