folium icon indicating copy to clipboard operation
folium copied to clipboard

Allow user's choice of layer control to be saved upon refresh

Open pstatonwx opened this issue 3 years ago • 3 comments

In the layer control menu, when a user selects/checks options, allow those choices to be saved if the app/website is refreshed.

pstatonwx avatar Oct 27 '22 12:10 pstatonwx

@Conengmo Think this is possible to add to Folium?

pstatonwx avatar Nov 07 '22 13:11 pstatonwx

Yes, I do think it's possible. I'm thinking you could add event hooks for when the layer control changes, to store the layer control state in local storage or something. Then on map load, check the local storage if there's a layer control state to restore.

I'm not sure if we want to include it in the main folium code or not. I'm leaning towards the latter, just so you know. But it'll still be worthwhile to figure out how to do it and share it with other users here!

Conengmo avatar Nov 07 '22 15:11 Conengmo

Okay thanks so much!

pstatonwx avatar Nov 07 '22 15:11 pstatonwx