how to draw a route between two location in streamlit
Hello @vaibhav_k
Do you have more details to provide, like what you mean drawing a route, do you want to browse from point A to point B in 3D, do you want to freedraw on a static map or do you want to draw straight lines on roads from A to B?
Without such details we won’t be able to give any meaningful advice!
Have a nice day,
Fanilo
it is like we use in google map we choose two places and then a direction from one point to another point along with a directed path is shown to us.

Hi @vaibhav_k -
Do you already have the linestring path, or do you need to solve for that first? Folium only displays data, it won’t do shortest-path calculations as far as I know.
Best,
Randy
Actually I was not looking for shortest path it could be any path but as you say it displays data only i.e the map portion only I think it’s not possible with it.
If you already have the line, you can plot it using PolyLine:
https://python-visualization.github.io/folium/modules.html#folium.vector_layers.PolyLine
Best,
Randy
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.