# Path: folium/map.py
# class Layer(MacroElement):
#     """An abstract class for everything that is a Layer on the map.
#     It will be used to define whether an object will be included in
#     LayerControls.
# 
#     Parameters
#     ----------
#     name : string, default None
#         The name of the Layer, as it will appear in LayerControls
#     overlay : bool, default False
#         Adds the layer as an optional overlay (True) or the base layer (False).
#     control : bool, default True
#         Whether the Layer will be included in LayerControls.
#     show: bool, default True
#         Whether the layer will be shown on opening (only for overlays).
#     """
#     def __init__(self, name=None, overlay=False, control=True, show=True):
#         super(Layer, self).__init__()
#         self.layer_name = name if name is not None else self.get_name()
#         self.overlay = overlay
#         self.control = control
#         self.show = show


from branca.element import Element, Figure
from folium.elements import JSCSSMixin
from folium.map import Layer
from folium.utilities import none_max, none_min
from jinja2 import Template
        Automatically play the animation across time.
    display_index: default True
        Display the index (usually time) in the time control.
    index_steps: default 1
        Steps to take in the index dimension between animation steps.
    min_speed: default 0.1
        Minimum fps speed for animation.
    max_speed: default 10
        Maximum fps speed for animation.
    speed_step: default 0.1
        Step between different fps speeds on the speed slider.
    position: default 'bottomleft'
        Position string for the time slider. Format: 'bottom/top'+'left/right'.
    overlay : bool, default True
        Adds the layer as an optional overlay (True) or the base layer (False).
    control : bool, default True
        Whether the Layer will be included in LayerControls.
    show: bool, default True
        Whether the layer will be shown on opening (only for overlays).

    """
    _template = Template(u"""
        {% macro script(this, kwargs) %}

            var times = {{this.times}};

            {{this._parent.get_name()}}.timeDimension = L.timeDimension(
                {times : times, currentTime: new Date(1)}
            );


# Path: folium/map.py
# class Layer(MacroElement):
#     """An abstract class for everything that is a Layer on the map.
#     It will be used to define whether an object will be included in
#     LayerControls.
# 
#     Parameters
#     ----------
#     name : string, default None
#         The name of the Layer, as it will appear in LayerControls
#     overlay : bool, default False
#         Adds the layer as an optional overlay (True) or the base layer (False).
#     control : bool, default True
#         Whether the Layer will be included in LayerControls.
#     show: bool, default True
#         Whether the layer will be shown on opening (only for overlays).
#     """
#     def __init__(self, name=None, overlay=False, control=True, show=True):
#         super(Layer, self).__init__()
#         self.layer_name = name if name is not None else self.get_name()
#         self.overlay = overlay
#         self.control = control
#         self.show = show


# Path: folium/plugins/heat_map_withtime.py
from branca.element import Element, Figure
from folium.elements import JSCSSMixin
from folium.map import Layer
from folium.utilities import none_max, none_min
from jinja2 import Template

        Automatically play the animation across time.
    display_index: default True
        Display the index (usually time) in the time control.
    index_steps: default 1
        Steps to take in the index dimension between animation steps.
    min_speed: default 0.1
        Minimum fps speed for animation.
    max_speed: default 10
        Maximum fps speed for animation.
    speed_step: default 0.1
        Step between different fps speeds on the speed slider.
    position: default 'bottomleft'
        Position string for the time slider. Format: 'bottom/top'+'left/right'.
    overlay : bool, default True
        Adds the layer as an optional overlay (True) or the base layer (False).
    control : bool, default True
        Whether the Layer will be included in LayerControls.
    show: bool, default True
        Whether the layer will be shown on opening (only for overlays).

    """
    _template = Template(u"""
        {% macro script(this, kwargs) %}

            var times = {{this.times}};

            {{this._parent.get_name()}}.timeDimension = L.timeDimension(
                {times : times, currentTime: new Date(1)}
            );


            var {{this._control_name}} = new L.Control.TimeDimensionCustom({{this.index}}, {