emilhe / dash-leaflet

MIT License
213 stars 37 forks source link

ImageOverlay's url and bounds props should accept None #145

Closed prl900 closed 1 year ago

prl900 commented 2 years ago

This is more an enhancement or suggestion for the ImageOverlay functionality -- this component is working as documented.

A common case with ImageOverlays is to be able to dynamically define the contents and location of the images through callbacks. In this case, a valid and scenario would be to be able to declare the ImageOverlay component with an id but with None values for the url and bounds properties. This currently throws an exception saying that these properties have to be defined.

Thanks

emilhe commented 1 year ago

For this usecase, I would instead recommend creating a LayerGroup as a container, and then update it's children with a new ImageOverlay component.