folium icon indicating copy to clipboard operation
folium copied to clipboard

Update VectorGridProtobuf to include popups when clicked

Open christianaaronschroeder opened this issue 1 year ago • 1 comments

I've tried using VectorGridProtobuf several times in the past and almost always found myself making a copy of this class and adding functionality to click a polygon and get the properties.

Open to suggestions, or other options, just putting this out there.

christianaaronschroeder avatar Apr 18 '24 20:04 christianaaronschroeder

@christianaaronschroeder Thanks for your contribution. This would be useful to add. I do have some questions and suggestions mostly having to do with configurability from the Python side.

Before going any further, there is an open Pull Request that does something similar. Could you have a look https://github.com/python-visualization/folium/pull/1903?

It allows you to set event handlers (on) from the Python side. Would this also solve your needs?

hansthen avatar Apr 20 '24 16:04 hansthen

@christianaaronschroeder Thanks for your contribution. This would be useful to add. I do have some questions and suggestions mostly having to do with configurability from the Python side.

Before going any further, there is an open Pull Request that does something similar. Could you have a look #1903?

It allows you to set event handlers (on) from the Python side. Would this also solve your needs?

I believe so! I'm open to trying that before moving forward with this one.

christianaaronschroeder avatar Apr 22 '24 14:04 christianaaronschroeder

@christianaaronschroeder Thanks for your contribution. This would be useful to add. I do have some questions and suggestions mostly having to do with configurability from the Python side. Before going any further, there is an open Pull Request that does something similar. Could you have a look #1903? It allows you to set event handlers (on) from the Python side. Would this also solve your needs?

I believe so! I'm open to trying that before moving forward with this one.

Great!

I will try to get that PR approved.

hansthen avatar Apr 23 '24 17:04 hansthen

@christianaaronschroeder By now PR https://github.com/python-visualization/folium/pull/1959 has been merged and I think also released into the new folium version. This feature allows you to add event handlers to arbitrary Layers. Can you have a look if this satisfies your need? If so, we can close this ticket.

hansthen avatar Jul 01 '24 17:07 hansthen

@hansthen looks good, thank you!

christianaaronschroeder avatar Jul 01 '24 17:07 christianaaronschroeder