opengeos / leafmap

A Python package for interactive mapping and geospatial analysis with minimal coding in a Jupyter environment
https://leafmap.org
MIT License
3.22k stars 386 forks source link

Run 01_leafmap_intro.ipynb on google colab nothing is plotted #268

Closed dustming closed 2 years ago

dustming commented 2 years ago

Environment Information

Description

Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.

What I Did

Run 01_leafmap_intro.ipynb on google colab nothing is plotted
giswqs commented 2 years ago

see https://github.com/giswqs/geemap/issues/1132#issuecomment-1179673334

dustming commented 2 years ago

see giswqs/geemap#1132 (comment)

Got it, Just saw the comment and it works~!!! This is amazing work!!!

I tried to use leafmap to plot a huge polygon dataset in google colab. it ended without error but nothing plotted.

Are you interested in test this large polygon dataset?

dustming commented 2 years ago

Here is the link for the large dataset.

I got an unknown problem when I tried to plot "finalcat_info.shp"

The same code works for a small watershed as shown in the following:

image

Thanks for all your amazing work!!!

giswqs commented 2 years ago

ipyleaflet can only handle relatively small datasets. For large datasets, you might need to host it on a server and access it through web services.

dustming commented 2 years ago

ipyleaflet can only handle relatively small datasets. For large datasets, you might need to host it on a server and access it through web services.

Hi Prof Wu, I notice that using a for loop to plot each polygon can solve this problem.

giswqs commented 2 years ago

Yes, you can certainly use a for-loop, but the map will eventually become non-responsive when adding too much data to the map.