traffic/plugins/leaflet.py
def point_leaflet(point: "PointMixin", **kwargs) -> Marker:
    """Returns a Leaflet layer to be directly added to a Map.

    .. warning::
        This is only available if the Leaflet `plugin <plugins.html>`_ is
        activated. (true by default)

    The elements passed as kwargs as passed as is to the Marker constructor.
    """

    default = dict()
    if hasattr(point, "name"):
        default["title"] = point.name

    kwargs = {**default, **kwargs}
    marker = Marker(location=(point.latitude, point.longitude), **kwargs)

    label = HTML()
    label.value = repr(point)
    marker.popup = label

    return marker
Returns a Leaflet layer to be directly added to a Map.

    .. warning::
        This is only available if the Leaflet `plugin <plugins.html>`_ is
        activated. (true by default)

    The elements passed as kwargs as passed as is to the Marker constructor.
    
Returns a Leaflet layer to be directly added to a Map.
warning::
This is only available if the Leaflet `plugin `_ is
activated. (true by default)

The elements passed as kwargs as passed as is to the Marker constructor.
Returns a Leaflet layer to be directly added to a Map . warning :: This is only available if the Leaflet ` plugin ` _ is activated . ( true by default ) The elements passed as kwargs as passed as is to the Marker constructor .
def point_leaflet(point: "PointMixin", **kwargs) -> Marker:
    default = dict()
    if hasattr(point, "name"):
        default["title"] = point.name
    kwargs = {**default, **kwargs}
    marker = Marker(location=(point.latitude, point.longitude), **kwargs)
    label = HTML()
    label.value = repr(point)
    marker.popup = label
    return marker
def point_leaflet ( point : "PointMixin" , ** kwargs ) -> Marker : default = dict ( ) if hasattr ( point , "name" ) : default [ "title" ] = point . name kwargs = { ** default , ** kwargs } marker = Marker ( location = ( point . latitude , point . longitude ) , ** kwargs ) label = HTML ( ) label . value = repr ( point ) marker . popup = label return marker
Returns a Leaflet layer to be directly added to a Map.
Returns a Leaflet layer to be directly added to a Map .
"""Returns a Leaflet layer to be directly added to a Map.

    .. warning::
        This is only available if the Leaflet `plugin <plugins.html>`_ is
        activated. (true by default)

    The elements passed as kwargs as passed as is to the Marker constructor.
    """
point
"PointMixin"