Hi,
I’ve a car which is on move and I’d like to see the roads in real time.
I’ve created a tile server (as it is a stand alone app), and can successfully read the real time data.
The code below is the one responsible for the path drawing.
The problem is that due to each call of the callback function (every 2 secs), the map is resized to it’s original size - i.e. if I perform a zoom, move to some area - it is always returns to the first map which was generated.
How to fix it so that it will show my preferred map?
def draw_path(df):
fig = px.scatter_mapbox(df, lat="CarLat", lon="CarLon")
fig.update_layout(mapbox_style="white-bg",
mapbox_layers=[
{ "below": 'traces',
"sourcetype": 'raster',
"source": ["http://127.0.0.1:1234/static/tiles/{z}/{x}/{y}.jpg"],
}
])
fig.update_scences(aspectmode="cube")
return fig
1 post - 1 participant