MCPcopy Index your code
hub / github.com/python-visualization/folium / test_circle_marker

Function test_circle_marker

tests/test_vector_layers.py:88–153  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86
87
88def test_circle_marker():
89 m = Map()
90 radius = 50
91 popup = f"I am {radius} pixels"
92 location = [-27.55, -48.8]
93
94 circle_marker = CircleMarker(
95 location=location,
96 radius=radius,
97 color="black",
98 weight=2,
99 fill_opacity=0.6,
100 opacity=1,
101 fill=True,
102 popup=popup,
103 )
104 circle_marker.add_to(m)
105
106 options = {
107 "bubblingMouseEvents": True,
108 "color": "black",
109 "dashArray": None,
110 "dashOffset": None,
111 "fill": True,
112 "fillColor": "black",
113 "fillOpacity": 0.6,
114 "fillRule": "evenodd",
115 "lineCap": "round",
116 "lineJoin": "round",
117 "opacity": 1,
118 "radius": radius,
119 "stroke": True,
120 "weight": 2,
121 }
122
123 m._repr_html_()
124 expected_bounds = [location, location]
125 expected_rendered = f"""
126 var {circle_marker.get_name()} = L.circleMarker(
127 {location},
128 {{
129 "bubblingMouseEvents": true,
130 "color": "black",
131 "dashArray": null,
132 "dashOffset": null,
133 "fill": true,
134 "fillColor": "black",
135 "fillOpacity": 0.6,
136 "fillRule": "evenodd",
137 "lineCap": "round",
138 "lineJoin": "round",
139 "opacity": 1,
140 "radius": {radius},
141 "stroke": true,
142 "weight": 2
143 }}
144 )
145 .addTo({m.get_name()});

Callers

nothing calls this directly

Calls 6

_repr_html_Method · 0.95
MapClass · 0.90
CircleMarkerClass · 0.90
normalizeFunction · 0.90
add_toMethod · 0.80
get_boundsMethod · 0.80

Tested by

no test coverage detected