Commit 3b20a05
Forward unrecognised Leaflet options in path_options
path_options pops the options it knows about and builds the result from
those, but never forwards the remaining kwargs. Leaflet Path options that
it does not name explicitly -- interactive, pane, renderer, attribution
and so on -- were therefore silently dropped from every vector overlay
(Circle, CircleMarker, PolyLine, Polygon, Rectangle).
This is inconsistent with the rest of folium: FeatureGroup, TileLayer,
GeoJson and the others all forward **kwargs to Leaflet via remove_empty.
The special-cased pass-through of tags, className and gradient shows the
intent was to support Leaflet options, just incompletely.
Forward the leftover options too, so e.g. CircleMarker(..., interactive=
False) actually reaches Leaflet.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent b972da7 commit 3b20a05
2 files changed
Lines changed: 33 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
126 | 131 | | |
127 | 132 | | |
128 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
0 commit comments