Skip to content

#1751 issue: add Filter polyline #1757

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions folium/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,9 @@ class GeoJson(Layer):
{% if this.style %}
style: {{ this.get_name() }}_styler,
{%- endif %}
{% if this.tags %}
"tags":{{this.tags}},
{%- endif %}
{%- if this.marker %}
pointToLayer: {{ this.get_name() }}_pointToLayer
{%- endif %}
Expand Down Expand Up @@ -636,6 +639,7 @@ def __init__(
popup: Optional["GeoJsonPopup"] = None,
zoom_on_click: bool = False,
marker: Union[Circle, CircleMarker, Marker, None] = None,
tags: List = None,
):
super().__init__(name=name, overlay=overlay, control=control, show=show)
self._name = "GeoJson"
Expand All @@ -647,6 +651,7 @@ def __init__(
self.style = style_function is not None
self.highlight = highlight_function is not None
self.zoom_on_click = zoom_on_click
self.tags= tags
if marker:
if not isinstance(marker, (Circle, CircleMarker, Marker)):
raise TypeError(
Expand Down
1 change: 1 addition & 0 deletions folium/plugins/antpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,6 @@ def __init__(self, locations, popup=None, tooltip=None, **kwargs):
"opacity": kwargs.pop("opacity", 0.5),
"color": kwargs.pop("color", "#0000FF"),
"pulseColor": kwargs.pop("pulse_color", "#FFFFFF"),
"tags":kwargs.pop("tags",None),
}
)
5 changes: 5 additions & 0 deletions folium/vector_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ def __init__(self, locations, popup=None, tooltip=None, **kwargs):
super().__init__(locations, popup=popup, tooltip=tooltip)
self._name = "PolyLine"
self.options = path_options(line=True, **kwargs)
self.options.update(
{
"tags":kwargs.pop("tags",None),
}
)


class Polygon(BaseMultiLocation):
Expand Down