Skip to content

Update keep_in_front docstring #1291

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

Merged
Merged
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: 3 additions & 2 deletions folium/folium.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,15 +418,16 @@ def choropleth(self, *args, **kwargs):
self.add_child(Choropleth(*args, **kwargs))

def keep_in_front(self, *args):
"""Pass one or multiples object that must stay in front.
"""Pass one or multiple layers that must stay in front.

The ordering matters, the last one is put on top.

Parameters
----------
*args :
Variable length argument list. Any folium object that counts as an
overlay. For example FeatureGroup or a vector object such as Marker.
overlay. For example FeatureGroup or TileLayer.
Does not work with markers, for those use z_index_offset.
"""
for obj in args:
self.objects_to_stay_in_front.append(obj)