Skip to content

Commit b754dbc

Browse files
add a gradient option to path_options (#1433)
* add a gradient option to path_options to allow removing the gradient added by leaflet-dvf * typo fix * fix docstring Co-authored-by: Frank <[email protected]>
1 parent 0946383 commit b754dbc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

folium/vector_layers.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ def path_options(line=False, radius=False, **kwargs):
5454
bubbling_mouse_events: Bool, True (bubblingMouseEvents)
5555
When true a mouse event on this path will trigger the same event on the
5656
map (unless L.DomEvent.stopPropagation is used).
57+
gradient: bool, default None
58+
When a gradient on the stroke and fill is available,
59+
allows turning it on or off.
5760
5861
Note that the presence of `fill_color` will override `fill=False`.
5962
@@ -78,6 +81,10 @@ def path_options(line=False, radius=False, **kwargs):
7881
fill_color = color
7982
fill = kwargs.pop('fill', False)
8083

84+
gradient = kwargs.pop('gradient', None)
85+
if gradient is not None:
86+
extra_options.update({'gradient': gradient})
87+
8188
default = {
8289
'stroke': kwargs.pop('stroke', True),
8390
'color': color,

0 commit comments

Comments
 (0)