python-visualization / folium

Python Data. Leaflet.js Maps.
https://python-visualization.github.io/folium/
MIT License
6.94k stars 2.23k forks source link

How to write plugin for Marker Cluster Slider? #1445

Closed nro-bot closed 3 years ago

nro-bot commented 3 years ago

Is your feature request related to a problem? Please describe. I would like to use slider / timeline with marker clusters, right now there is only chloropleth or heatmap with slider. I am wondering if there is any documentation on "porting" or "wrapping" for plugins is written, since I am not familiar with Leaflet or really javascript. I'm also not familiar with python library dev either - may I just put it inside my pip install site-packages source and the plugin will work?

Describe the solution you'd like Plugin / wrapper to be able to use https://github.com/ghybs/Leaflet.MarkerCluster.LayerSupport in folium.

Describe alternatives you've considered I could use javascript directly but it would be nice to incorporate it into jupyter notebooks.

Additional context Here is a demo of descired behaviour: https://ghybs.github.io/Leaflet.MarkerCluster.LayerSupport/examples/mcgLayerSupport-leafletslider.html https://github.com/python-visualization/folium/blob/master/folium/plugins/heat_map_withtime.py

Implementation folium is maintained by volunteers. Can you help make a PR if we want to implement this feature? Sure

Notes: Here is what I am trying to follow, it's a lot so a tutorial or step-by-step explanation would be amazing if it exists. Markers only: https://github.com/dwilhelm89/LeafletSlider Marker clusters: https://github.com/ghybs/Leaflet.MarkerCluster.LayerSupport Leaflet tutorial: https://leafletjs.com/examples/layers-control/ Slider controls: https://github.com/python-visualization/folium/blob/master/folium/plugins/heat_map_withtime.py Another ported plugin: https://github.com/thomasbrueggemann/leaflet.boatmarker ->https://github.com/python-visualization/folium/blob/master/folium/plugins/boat_marker.py Heatmap port: https://github.com/Leaflet/Leaflet.heat -> https://github.com/python-visualization/folium/blob/master/folium/plugins/heat_map_withtime.py

nro-bot commented 3 years ago

Decided to not use this visualization

EmanuelCastanho commented 1 year ago

Hi @nro-bot , I am having a similar problem https://github.com/python-visualization/folium/issues/1804

How did you solve this?