-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Documentation added for Geoman plugin with examples #2181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation added for Geoman plugin with examples #2181
Conversation
import folium
from folium.plugins import GeoMan
m = folium.Map(location=[45.5236, -122.6750], zoom_start=13)
# Create a feature group for drawn items
drawn_items = folium.FeatureGroup(name="Drawn Items")
drawn_items.add_to(m)
# Add Geoman with the feature group
GeoMan(feature_group=drawn_items).add_to(m)
# Add layer control to toggle visibility of drawn items
folium.LayerControl().add_to(m)
mAdditionally, I am trying to add Geoman to FeatureGroup and toggle visibility using LayerControl. But i am not able to. Is my implementation correct? @hansthen |
|
@hansthen , i later discovered the available methods are already listed here - https://python-visualization.github.io/folium/latest/reference.html Should I remove it from my changes in this PR? |
Yes, it is a bit redundant now. |
Very nice. You might want to add a few sentences about the advantages of the Geoman plugin compared to the Draw plugin. It is more recent. It supports more functionality, such as drawing shapes with holes inside of them. It also has paid add-ons with advanced functionality. Otherwise, looks good to merge to me. |
I think you found a bug. It seems like newly created elements are not added to the feature group. I will create a ticket for that. |
removed and pushed. |
have added the information. let me know if anything is missing (don't have complete background on these plugins 😊). |
Okay, thats interesting. will add it to my list of things to explore next 👍. |
Too late :-) PR is already done. But if you are interested in solving bugs, there is a new one that I have not had the chance to look at #2175. It looks very similar to this one. |
|
LGTM. Thanks for your updates. |
No problem, will check this one out. |
…tion#2181) * documentation added for geoman plugin with example
Fixes #2149 : Add documentation for the Geoman plugin.
Summary
This PR adds complete documentation for the Geoman plugin that was released in Folium 0.19.6 but previously lacked documentation.