o
    Pf                     @   sF   d dl mZ d dlmZ d dlmZ d dlmZ G dd deeZdS )    )Template)
JSCSSMixin)Marker)parse_optionsc                       s:   e Zd ZdZedZdgZ					d fdd	Z  ZS )	
BoatMarkera\  Add a Marker in the shape of a boat.

    Parameters
    ----------
    location: tuple of length 2, default None
        The latitude and longitude of the marker.
        If None, then the middle of the map is used.
    heading: int, default 0
        Heading of the boat to an angle value between 0 and 360 degrees
    wind_heading: int, default None
        Heading of the wind to an angle value between 0 and 360 degrees
        If None, then no wind is represented.
    wind_speed: int, default 0
        Speed of the wind in knots.

    https://github.com/thomasbrueggemann/leaflet.boatmarker

    a`  
        {% macro script(this, kwargs) %}
            var {{ this.get_name() }} = L.boatMarker(
                {{ this.location|tojson }},
                {{ this.options|tojson }}
            ).addTo({{ this._parent.get_name() }});
            {% if this.wind_heading is not none -%}
            {{ this.get_name() }}.setHeadingWind(
                {{ this.heading }},
                {{ this.wind_speed }},
                {{ this.wind_heading }}
            );
            {% else -%}
            {{this.get_name()}}.setHeading({{this.heading}});
            {% endif -%}
        {% endmacro %}
        )markerclusterjsz>https://unpkg.com/leaflet.boatmarker/leaflet.boatmarker.min.jsNr   c                    s>   t  j|||d d| _|| _|| _|| _tdi || _d S )N)popupiconr    )super__init___nameheadingwind_heading
wind_speedr   options)selflocationr   r	   r   r   r   kwargs	__class__r
   f/home/deployuser/azure_apps/autowriter/venv/lib/python3.10/site-packages/folium/plugins/boat_marker.pyr   7   s   
zBoatMarker.__init__)NNr   Nr   )	__name__
__module____qualname____doc__r   	_template
default_jsr   __classcell__r
   r
   r   r   r      s    
r   N)	jinja2r   folium.elementsr   
folium.mapr   folium.utilitiesr   r   r
   r
   r
   r   <module>   s
    