You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Combining GeoJson markers in a MarkerCluster shows unclustered markers #1209
changed the title [-]Combining `GeoJson` with `MarkerCluster`[/-][+]Combining `GeoJson` markers in a `MarkerCluster` shows unclustered markers[/+]on Sep 27, 2019
Hi @diegoquintanav, I think that #1190 fixed the problem you mention, and it was done after the release of version 10. Therefore, would be better install folium directly from github give it a try again.
It seems #1190 (merged July 2019) and #1289 (merged April 2020) are at odds with each other. We have to resolve the conflicting requirements. Some ideas:
make the ajax call synchronous and add to parent when it finished
move the embedded data to the GeoJson() call and accept that not al functionality will work when not embedding data.
I think I've found a way round it. If you make the GeoJson a subgroup of the MarkerCluster it seems to work. Although weirdly you need to untick and tick GeoJson layer (Housing) for it show anything.
It seems combining GeoJsonTooltip and MarkerCluster plugin is not supported behavior. Note that while everything in the base folium library should work well together we can't guarantee that for the plugins.
I don't think using the FeatureGroupSubGroup plugin is a real solution here. I'll make a PR where we do the ajax call asynchronously.
The fix has been merged. It will be in the next release, v0.12.0, release date yet unknown. If you want it earlier you can install folium from the main branch:
Activity
[-]Combining `GeoJson` with `MarkerCluster`[/-][+]Combining `GeoJson` markers in a `MarkerCluster` shows unclustered markers[/+]fullonic commentedon Oct 22, 2019
Hi @diegoquintanav, I think that #1190 fixed the problem you mention, and it was done after the release of version 10. Therefore, would be better install folium directly from github give it a try again.
fullonic commentedon Oct 24, 2019
Confirmed! It works with folium installed directly from github.
I had time to run your script and here is a screenshot of the html file.
vjsequi commentedon Jun 12, 2020
I am having the same issues I'm afraid. It doesn't render the MarkerCluster at all.
Thanks for your help!
Conengmo commentedon Jun 13, 2020
It seems #1190 (merged July 2019) and #1289 (merged April 2020) are at odds with each other. We have to resolve the conflicting requirements. Some ideas:
GeoJson()call and accept that not al functionality will work when not embedding data.vjsequi commentedon Jun 13, 2020
I think I've found a way round it. If you make the GeoJson a subgroup of the MarkerCluster it seems to work. Although weirdly you need to untick and tick GeoJson layer (Housing) for it show anything.
My next query is, how can I show labels, either tooltips or popups? Substituting
mc1with the code below doesn't seem to work.Conengmo commentedon Jun 13, 2020
It seems combining
GeoJsonTooltipandMarkerClusterplugin is not supported behavior. Note that while everything in the base folium library should work well together we can't guarantee that for the plugins.I don't think using the
FeatureGroupSubGroupplugin is a real solution here. I'll make a PR where we do the ajax call asynchronously.Conengmo commentedon Jun 18, 2020
The fix has been merged. It will be in the next release, v0.12.0, release date yet unknown. If you want it earlier you can install folium from the main branch: