A circle of a fixed size with radius specified in pixels. See :func:`folium.vector_layers.path_options` for the `Path` options. Parameters ---------- location: tuple[float, float] Latitude and Longitude pair (Northing, Easting) popup: string or folium.Popup, defaul
| 344 | |
| 345 | |
| 346 | class CircleMarker(Marker): |
| 347 | """ |
| 348 | A circle of a fixed size with radius specified in pixels. |
| 349 | |
| 350 | See :func:`folium.vector_layers.path_options` for the `Path` options. |
| 351 | |
| 352 | Parameters |
| 353 | ---------- |
| 354 | location: tuple[float, float] |
| 355 | Latitude and Longitude pair (Northing, Easting) |
| 356 | popup: string or folium.Popup, default None |
| 357 | Input text or visualization for object displayed when clicking. |
| 358 | tooltip: str or folium.Tooltip, default None |
| 359 | Display a text when hovering over the object. |
| 360 | radius: float, default 10 |
| 361 | Radius of the circle marker, in pixels. |
| 362 | **kwargs |
| 363 | Other valid (possibly inherited) options. See: |
| 364 | https://leafletjs.com/reference.html#circlemarker |
| 365 | |
| 366 | """ |
| 367 | |
| 368 | _template = Template( |
| 369 | """ |
| 370 | {% macro script(this, kwargs) %} |
| 371 | var {{ this.get_name() }} = L.circleMarker( |
| 372 | {{ this.location|tojson }}, |
| 373 | {{ this.options|tojson }} |
| 374 | ).addTo({{ this._parent.get_name() }}); |
| 375 | {% endmacro %} |
| 376 | """ |
| 377 | ) |
| 378 | |
| 379 | def __init__( |
| 380 | self, |
| 381 | location: Optional[Sequence[float]] = None, |
| 382 | radius: float = 10, |
| 383 | popup: Union[Popup, str, None] = None, |
| 384 | tooltip: Union[Tooltip, str, None] = None, |
| 385 | **kwargs: TypePathOptions, |
| 386 | ): |
| 387 | super().__init__(location, popup=popup, tooltip=tooltip) |
| 388 | self._name = "CircleMarker" |
| 389 | self.options = path_options(line=False, radius=radius, **kwargs) |