How should I allow the traces of line and markers to overlap on a plotly map for scattermapbox function?
fig = go.Figure(go.Scattermapbox())
fig.add_trace(go.Scattermapbox(
mode = "lines", #lines
lon =longlist,
lat = latlist,
marker = {'size': 1, 'opacity' : 0.7}))
fig.add_trace(go.Scattermapbox(
mode= "markers", #markers
lon = df['Longitude'], lat = df['Latitude'],
text = df['text'],
marker_color = "aqua",
))
# fig.update_geos(
# resolution=50,projection_type='wagner6'
# )
fig.update_layout(height=500, margin={"r":0,"t":40,"l":0,"b":0},mapbox = {
'style': "carto-positron",
'center': {'lon':103.8198, 'lat': 1.3521},
'zoom': 10.2}, title ="Singapore MRT stations"
)
fig.update_traces(marker=dict(size=20))
# Size
fig.show()
At the marker size of 20, only the lines are shown with the markers hidden.

When I change the size marker size to 50, only the markers are shown and the lines are not shown.

I would like to show both at the same time even if they are overlapping.