Skip to content

Geoman drawn elements cannot be controlled using a LayerControl #2182

Description

@hansthen

Describe the bug
Elements that are created using Geoman are not enabled/disabled when clicking the appropriate LayerControl layers.

To Reproduce

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)

m```

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions