Skip to content

Commit 1f580bc

Browse files
committed
Merge remote-tracking branch 'upstream/main' into documentation-project
2 parents 36a3687 + 14c9d26 commit 1f580bc

10 files changed

Lines changed: 15 additions & 9 deletions

.github/workflows/deploy-docs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ jobs:
2323
python=3
2424
--file requirements.txt
2525
--file requirements-dev.txt
26-
cache-environment: true
2726
2827
- name: Install folium from source
2928
shell: bash -l {0}

.github/workflows/test_code.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
python=${{ matrix.python-version }}
2323
--file requirements.txt
2424
--file requirements-dev.txt
25-
cache-environment: true
2625
2726
- name: Install folium from source
2827
shell: bash -l {0}

.github/workflows/test_code_notebooks.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ jobs:
1717
python=3
1818
--file requirements.txt
1919
--file requirements-dev.txt
20-
cache-environment: true
2120
2221
- name: Install folium from source
2322
shell: bash -l {0}

.github/workflows/test_latest_branca.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ jobs:
1717
python=3
1818
--file requirements.txt
1919
--file requirements-dev.txt
20-
cache-environment: true
2120
2221
- name: Install folium from source
2322
shell: bash -l {0}

.github/workflows/test_mypy.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ jobs:
1717
python=3
1818
--file requirements.txt
1919
--file requirements-dev.txt
20-
cache-environment: true
2120
2221
- name: Install folium from source
2322
shell: bash -l {0}

.github/workflows/test_selenium.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ jobs:
1717
python=3
1818
--file requirements.txt
1919
--file requirements-dev.txt
20-
cache-environment: true
2120
2221
- name: Install folium from source
2322
shell: bash -l {0}

.github/workflows/test_style_notebooks.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ jobs:
1717
python=3
1818
--file requirements.txt
1919
--file requirements-dev.txt
20-
cache-environment: true
2120
2221
- name: Install folium from source
2322
shell: bash -l {0}

folium/features.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,8 @@ class GeoJson(Layer):
498498
embedding is only supported if you provide a file link or URL.
499499
zoom_on_click: bool, default False
500500
Set to True to enable zooming in on a geometry when clicking on it.
501+
**kwargs
502+
Keyword arguments are passed to the geoJson object as extra options.
501503
502504
Examples
503505
--------
@@ -602,8 +604,11 @@ class GeoJson(Layer):
602604
style: {{ this.get_name() }}_styler,
603605
{%- endif %}
604606
{%- if this.marker %}
605-
pointToLayer: {{ this.get_name() }}_pointToLayer
607+
pointToLayer: {{ this.get_name() }}_pointToLayer,
606608
{%- endif %}
609+
{%- for key, value in this.options.items() %}
610+
{{ key }}: {{ value|tojson }},
611+
{%- endfor %}
607612
});
608613
609614
function {{ this.get_name() }}_add (data) {
@@ -636,6 +641,7 @@ def __init__(
636641
popup: Optional["GeoJsonPopup"] = None,
637642
zoom_on_click: bool = False,
638643
marker: Union[Circle, CircleMarker, Marker, None] = None,
644+
**kwargs: TypeJsonValue,
639645
):
640646
super().__init__(name=name, overlay=overlay, control=control, show=show)
641647
self._name = "GeoJson"
@@ -653,6 +659,7 @@ def __init__(
653659
"Only Marker, Circle, and CircleMarker are supported as GeoJson marker types."
654660
)
655661
self.marker = marker
662+
self.options = parse_options(**kwargs)
656663

657664
self.data = self.process_data(data)
658665

folium/plugins/tag_filter_button.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@
77

88
class TagFilterButton(JSCSSMixin, MacroElement):
99
"""
10-
Creates a Tag Filter Button to filter markers based on criteria
10+
Creates a Tag Filter Button to filter elements based on criteria
1111
(https://github.com/maydemirx/leaflet-tag-filter-button)
1212
13+
This plugin works for multiple element types like Marker, GeoJson
14+
and vector layers like PolyLine.
15+
1316
Parameters
1417
----------
1518
data: list, of strings.

folium/vector_layers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ def path_options(
9999
if gradient is not None:
100100
extra_options.update({"gradient": gradient})
101101

102+
if kwargs.get("tags"):
103+
extra_options["tags"] = kwargs.pop("tags")
104+
102105
default = {
103106
"stroke": kwargs.pop("stroke", True),
104107
"color": color,

0 commit comments

Comments
 (0)