Skip to content

Commit 7cf9c61

Browse files
author
Martin Journois
committed
Add RegularPolygonMarker docstring
1 parent a7365bb commit 7cf9c61

1 file changed

Lines changed: 33 additions & 5 deletions

File tree

folium/features.py

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,41 @@ def __init__(self, url, name=None,
4949

5050

5151
class RegularPolygonMarker(MacroElement):
52-
def __init__(self, location, popup=None,
53-
color='black', opacity=1, weight=2,
52+
def __init__(self, location, color='black', opacity=1, weight=2,
5453
fill_color='blue', fill_opacity=1,
55-
number_of_sides=4, rotation=0, radius=15):
56-
"""
57-
TODO docstring here
54+
number_of_sides=4, rotation=0, radius=15, popup=None):
55+
"""Custom markers using the Leaflet Data Vis Framework.
5856
57+
Parameters
58+
----------
59+
location: tuple or list, default None
60+
Latitude and Longitude of Marker (Northing, Easting)
61+
color: string, default 'black'
62+
Marker line color
63+
opacity: float, default 1
64+
Line opacity, scale 0-1
65+
weight: int, default 2
66+
Stroke weight in pixels
67+
fill_color: string, default 'blue'
68+
Marker fill color
69+
fill_opacity: float, default 1
70+
Marker fill opacity
71+
number_of_sides: int, default 4
72+
Number of polygon sides
73+
rotation: int, default 0
74+
Rotation angle in degrees
75+
radius: int, default 15
76+
Marker radius, in pixels
77+
popup: string or folium.Popup, default None
78+
Input text or visualization for object. Can pass either text,
79+
or a folium.Popup object.
80+
If None, no popup will be displayed.
81+
82+
Returns
83+
-------
84+
Polygon marker names and HTML in obj.template_vars
85+
86+
For more information, see https://humangeo.github.io/leaflet-dvf/
5987
"""
6088
super(RegularPolygonMarker, self).__init__()
6189
self._name = 'RegularPolygonMarker'

0 commit comments

Comments
 (0)