Repository: randyzwitch/streamlit-folium (language: python)

Issue:
folium-vectorgrid support?
Hi,  currently using 0.8.1 of streamlit-folium to render a map and I was hoping to use `folium.plugins.VectroGridProtobuf` as a layer to serve vector tiles.  If i save out my folium to an index.html i'm getting a good map with vector tiles displaying,  but using streamlit-folium  i'm seeing 

```
Uncaught TypeError: L.vectorGrid is undefined
    <anonymous> index.html:22
    onRender index.tsx:192
    dispatchEvent event-target.mjs:337
    onRenderMessage streamlit.js:172
    onMessageEvent streamlit.js:143
index.html:22:38
    <anonymous> index.html:22
    onRender index.tsx:192
    dispatchEvent event-target.mjs:337
    onRenderMessage streamlit.js:172
    onMessageEvent streamlit.js:143
```

Do I need to do something extra to build vectrogrid support into the JS that is bundled? Sorry my familiarity with the javascript ecosystem is somewhat limited.  Thanks for all your hard work!


Discussion / hints:

Fix patch:
diff --git a/requirements.txt b/requirements.txt
index a6658c2..d938bdc 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,4 @@
 streamlit>=1.2.0
-folium>=0.11
+folium>=0.13
 jinja2
 branca
diff --git a/setup.py b/setup.py
index 6781caa..8efa2d5 100644
--- a/setup.py
+++ b/setup.py
@@ -13,5 +13,5 @@
     include_package_data=True,
     classifiers=[],
     python_requires=">=3.7",
-    install_requires=["streamlit>=1.2", "folium>=0.11", "jinja2", "branca"],
+    install_requires=["streamlit>=1.2", "folium>=0.13", "jinja2", "branca"],
 )
diff --git a/streamlit_folium/frontend/public/index.html b/streamlit_folium/frontend/public/index.html
index 7779362..a3dcf42 100644
--- a/streamlit_folium/frontend/public/index.html
+++ b/streamlit_folium/frontend/public/index.html
@@ -49,6 +49,8 @@
     <script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/1.0.2/leaflet.draw.js"></script>
     <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
     <script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-locatecontrol/0.66.2/L.Control.Locate.min.js"></script>
+    <script src="https://unpkg.com/leaflet.vectorgrid@latest/dist/Leaflet.VectorGrid.bundled.js"></script>
+
     <link
       rel="stylesheet"
       href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/1.0.2/leaflet.draw.css"


Test patch:
diff --git a/tests/test_package.py b/tests/test_package.py
index c3504cd..ea5733e 100644
--- a/tests/test_package.py
+++ b/tests/test_package.py
@@ -102,3 +102,16 @@ def test_dual_map():
 
     assert "var map_div = L.map(" in map_str
     assert "var map_div2 = L.map(" in map_str
+
+
+def test_vector_grid():
+    import folium
+    from folium.plugins import VectorGridProtobuf
+
+    from streamlit_folium import _get_map_string
+
+    m = folium.Map()
+    url = "https://free-{s}.tilehosting.com/data/v3/{z}/{x}/{y}.pbf?token={token}"
+    VectorGridProtobuf(url, "test").add_to(m)
+    leaflet = _get_map_string(m)
+    assert "var vector_grid_protobuf_div_1 = L.vectorGrid.protobuf(" in leaflet