Closed mohammad7t closed 6 years ago
@mhsekhavat yes. That's from the docstring for making folium/leaflet web maps, and as the rest of it states:
Note that anything larger than a small city can take a long time to plot and create a large web map file that is very slow to load as JavaScript.
Writing out all that data can be slow, and having your web browser render it as an interactive web map can be slow.
If you want to plot a large network, just use the standard ox.plot_graph
function and it will work just fine.
Thanks for your answer @gboeing . Actually, I forgot to mention "interactive" in my question. I wonder if it could be possible to plot large networks interactively. It seems that mapbox interactive maps can visualize large geojson data very well in browser, without need for external tileserver or other efforts. Example: http://bl.ocks.org/ryanbaumann/04c442906638e27db9da243f29195592
@mhsekhavat ah, yes of course. If I were trying to plot a large network using that Mapbox GL JS method, I'd dump the graph to geopandas GeoDataFrames: https://osmnx.readthedocs.io/en/stable/osmnx.html#osmnx.save_load.graph_to_gdfs
Then you can just save those GeoDataFrames to disk as GeoJSON, then plug that data into the example you linked to.
Thanks
Hi, Thanks for the great library. Is it feasible to plot a network with large amounts of nodes and edges using
osmnx
? https://github.com/gboeing/osmnx/blob/5c267dcd0dc294232d6b526bd14b2d5e034ae9ee/osmnx/plot.py#L647