-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Make the Map pickable #1813
Comments
Ok, seems to work now ! The solution proposed needs branca modification python-visualization/branca#144 though. |
Interesting! I haven't looked into the changes very thoroughly, but I wanted to challenge first already: Is it possible to do this with changes just in Branca's Element class? Not in every class? So no adding
I haven't tried this myself so these are questions for you! Curious to hear what is possible. |
Indeed, I just tried and I can still simplify the setstate I will update the PR soon ! |
Too bad we can't extract the template string from the Template objects. I'd still like to avoid having to update every class though by specifying Maybe as an alternative we can remove the |
Not sure how to add it from the class actually : do you have an exemple ? |
I looked into it a bit more, learned more about pickling and unpickling. Forget what I said in my previous comment. I learned that class attributes are not pickled, so we don't have to worry about I also realised we can save ourselves some trouble by not adding @BastienGauthier is python-visualization/branca#144 ready for review? |
Yes, ready to go ! |
This was implemented in python-visualization/branca#144. |
Is your feature request related to a problem? Please describe.
As an extension of python-visualization/branca#99, I want to be able to cache a map for an application, to switch quickly between them.
Describe the solution you'd like
I proposed a first solution in the following PR : #1812
The solution is partial and would greatly appreciate any help, as I feel a pickable Map could be helpful in many ways.
Additional context
Map before correction :
Map after correction
Implementation
See #1812
The text was updated successfully, but these errors were encountered: