diff --git a/branca/element.py b/branca/element.py index 7c6c699..485fbf0 100644 --- a/branca/element.py +++ b/branca/element.py @@ -70,9 +70,6 @@ def __init__( elif template_name is not None: self._template = ENV.get_template(template_name) - - - def __getstate__(self) -> dict: """Modify object state when pickling the object. @@ -157,7 +154,7 @@ def add_child( # replace the proposed child with a clone of the proposed child because # add_child 1) overwrites any existing value in the child._parent field # and 2) does not do anything to remove the child from the list of children of the prior parent - # leading to inconsistency and to problems like the fact that adding the same icon to a map twice fails, as + # leading to inconsistency and to problems like the fact that adding the same icon to a map twice fails, as # documented in https://github.com/python-visualization/folium/issues/1885 # Creating a clone leads to internally consistent behavior if the # child already has a parent, although existing code of the form: @@ -170,7 +167,6 @@ def add_child( print("Note: the branca add_child function cloned an element rather than overwrite its existing parent element. This is new behavior as of early 2025. If you got this after issuing a command like my_map.add_child(myElement) and plan to issue a subsequent command like myElement.change(), that subsequent command will not affect the clone. Try either issuing the myElement.change() command first or creating a fresh version of myElement with no parent.") child = child.clone() - if name is None: name = child.get_name() if index is None: