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

Class Circle

folium/vector_layers.py:297–343  ·  view source on GitHub ↗

Class for drawing circle overlays on a map. It's an approximation and starts to diverge from a real circle closer to the poles (due to projection distortion). See :func:`folium.vector_layers.path_options` for the `Path` options. Parameters ---------- location: tuple[f

Source from the content-addressed store, hash-verified

295
296
297class Circle(Marker):
298 """
299 Class for drawing circle overlays on a map.
300
301 It's an approximation and starts to diverge from a real circle closer to
302 the poles (due to projection distortion).
303
304 See :func:`folium.vector_layers.path_options` for the `Path` options.
305
306 Parameters
307 ----------
308 location: tuple[float, float]
309 Latitude and Longitude pair (Northing, Easting)
310 popup: string or folium.Popup, default None
311 Input text or visualization for object displayed when clicking.
312 tooltip: str or folium.Tooltip, default None
313 Display a text when hovering over the object.
314 radius: float
315 Radius of the circle, in meters.
316 **kwargs
317 Other valid (possibly inherited) options. See:
318 https://leafletjs.com/reference.html#circle
319
320 """
321
322 _template = Template(
323 """
324 {% macro script(this, kwargs) %}
325 var {{ this.get_name() }} = L.circle(
326 {{ this.location|tojson }},
327 {{ this.options|tojson }}
328 ).addTo({{ this._parent.get_name() }});
329 {% endmacro %}
330 """
331 )
332
333 def __init__(
334 self,
335 location: Optional[Sequence[float]] = None,
336 radius: float = 50,
337 popup: Union[Popup, str, None] = None,
338 tooltip: Union[Tooltip, str, None] = None,
339 **kwargs: TypePathOptions,
340 ):
341 super().__init__(location, popup=popup, tooltip=tooltip)
342 self._name = "circle"
343 self.options = path_options(line=False, radius=radius, **kwargs)
344
345
346class CircleMarker(Marker):

Callers 1

test_circleFunction · 0.90

Calls 1

TemplateClass · 0.90

Tested by 1

test_circleFunction · 0.72