# 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


import warnings
import numpy as np
from folium.elements import JSCSSMixin
from folium.map import Layer
from folium.utilities import (
    none_max,
    none_min,
    parse_options,
    if_pandas_df_convert_to_numpy,
    validate_location,
)
from jinja2 import Template

    Parameters
    ----------
    data : list of points of the form [lat, lng] or [lat, lng, weight]
        The points you want to plot.
        You can also provide a numpy.array of shape (n,2) or (n,3).
    name : string, default None
        The name of the Layer, as it will appear in LayerControls.
    min_opacity  : default 1.
        The minimum opacity the heat will start at.
    max_zoom : default 18
        Zoom level where the points reach maximum intensity (as intensity
        scales with zoom), equals maxZoom of the map by default
    radius : int, default 25
        Radius of each "point" of the heatmap
    blur : int, default 15
        Amount of blur
    gradient : dict, default None
        Color gradient config. e.g. {0.4: 'blue', 0.65: 'lime', 1: 'red'}
    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 {{ this.get_name() }} = L.heatLayer(
                {{ this.data|tojson }},

# 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.py
import warnings
import numpy as np
from folium.elements import JSCSSMixin
from folium.map import Layer
from folium.utilities import (
    none_max,
    none_min,
    parse_options,
    if_pandas_df_convert_to_numpy,
    validate_location,
)
from jinja2 import Template


    Parameters
    ----------
    data : list of points of the form [lat, lng] or [lat, lng, weight]
        The points you want to plot.
        You can also provide a numpy.array of shape (n,2) or (n,3).
    name : string, default None
        The name of the Layer, as it will appear in LayerControls.
    min_opacity  : default 1.
        The minimum opacity the heat will start at.
    max_zoom : default 18
        Zoom level where the points reach maximum intensity (as intensity
        scales with zoom), equals maxZoom of the map by default
    radius : int, default 25
        Radius of each "point" of the heatmap
    blur : int, default 15
        Amount of blur
    gradient : dict, default None
        Color gradient config. e.g. {0.4: 'blue', 0.65: 'lime', 1: 'red'}
    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 {{ this.get_name() }} = L.heatLayer(
                {{ this.data|tojson }},

                {{ this.options|tojson }}