# 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/raster_layers.py
# class WmsTileLayer(Layer):
#     """
#     Creates a Web Map Service (WMS) layer.
# 
#     Parameters
#     ----------
#     url : str
#         The url of the WMS server.
#     layers : str
#         Comma-separated list of WMS layers to show.
#     styles : str, optional
#         Comma-separated list of WMS styles.
#     fmt : str, default 'image/jpeg'
#         The format of the service output. Ex: 'image/png'
#     transparent: bool, default False
#         Whether the layer shall allow transparency.
#     version : str, default '1.1.1'
#         Version of the WMS service to use.
#     attr : str, default ''
#         The attribution of the service.
#         Will be displayed in the bottom right corner.
#     name : string, optional
#         The name of the Layer, as it will appear in LayerControls
#     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).
#     **kwargs : additional keyword arguments
#         Passed through to the underlying tileLayer.wms object and can be used
#         for setting extra tileLayer.wms parameters or as extra parameters in
#         the WMS request.
# 
#     See https://leafletjs.com/reference-1.6.0.html#tilelayer-wms
#     """
#     _template = Template(u"""
#         {% macro script(this, kwargs) %}
#             var {{ this.get_name() }} = L.tileLayer.wms(
#                 {{ this.url|tojson }},
#                 {{ this.options|tojson }}
#             ).addTo({{ this._parent.get_name() }});
#         {% endmacro %}
#         """)  # noqa
# 
#     def __init__(self, url, layers, styles='', fmt='image/jpeg',
#                  transparent=False, version='1.1.1', attr='',
#                  name=None, overlay=True, control=True, show=True, **kwargs):
#         super(WmsTileLayer, self).__init__(name=name, overlay=overlay,
#                                            control=control, show=show)
#         self.url = url
#         kwargs['format'] = fmt
#         self.options = parse_options(
#             layers=layers,
#             styles=styles,
#             transparent=transparent,
#             version=version,
#             attribution=attr,
#             **kwargs
#         )


from folium.elements import JSCSSMixin
from folium.map import Layer
from folium.raster_layers import WmsTileLayer
from folium.utilities import parse_options
from jinja2 import Template
    ...          styles='',
    ...          fmt='image/png',
    ...          transparent=True,
    ...          layers='test_data',
    ...          COLORSCALERANGE='0,10',
    ...)
    >>> w0.add_to(m)
    >>> w1 = WmsTileLayer(
    ...          'http://this.wms.server/ncWMS/wms',
    ...          name='Test WMS Data',
    ...          styles='',
    ...          fmt='image/png',
    ...          transparent=True,
    ...          layers='test_data_2',
    ...          COLORSCALERANGE='0,5',
    ...)
    >>> w1.add_to(m)
    >>> # Add WmsTileLayers to time control.
    >>> time = TimestampedWmsTileLayers([w0, w1])
    >>> time.add_to(m)

    See https://github.com/socib/Leaflet.TimeDimension for more information.

    """
    _template = Template("""
        {% macro script(this, kwargs) %}
            {{ this._parent.get_name() }}.timeDimension = L.timeDimension(
                {{ this.options|tojson }}
            );
            {{ this._parent.get_name() }}.timeDimensionControl =

# 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/raster_layers.py
# class WmsTileLayer(Layer):
#     """
#     Creates a Web Map Service (WMS) layer.
# 
#     Parameters
#     ----------
#     url : str
#         The url of the WMS server.
#     layers : str
#         Comma-separated list of WMS layers to show.
#     styles : str, optional
#         Comma-separated list of WMS styles.
#     fmt : str, default 'image/jpeg'
#         The format of the service output. Ex: 'image/png'
#     transparent: bool, default False
#         Whether the layer shall allow transparency.
#     version : str, default '1.1.1'
#         Version of the WMS service to use.
#     attr : str, default ''
#         The attribution of the service.
#         Will be displayed in the bottom right corner.
#     name : string, optional
#         The name of the Layer, as it will appear in LayerControls
#     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).
#     **kwargs : additional keyword arguments
#         Passed through to the underlying tileLayer.wms object and can be used
#         for setting extra tileLayer.wms parameters or as extra parameters in
#         the WMS request.
# 
#     See https://leafletjs.com/reference-1.6.0.html#tilelayer-wms
#     """
#     _template = Template(u"""
#         {% macro script(this, kwargs) %}
#             var {{ this.get_name() }} = L.tileLayer.wms(
#                 {{ this.url|tojson }},
#                 {{ this.options|tojson }}
#             ).addTo({{ this._parent.get_name() }});
#         {% endmacro %}
#         """)  # noqa
# 
#     def __init__(self, url, layers, styles='', fmt='image/jpeg',
#                  transparent=False, version='1.1.1', attr='',
#                  name=None, overlay=True, control=True, show=True, **kwargs):
#         super(WmsTileLayer, self).__init__(name=name, overlay=overlay,
#                                            control=control, show=show)
#         self.url = url
#         kwargs['format'] = fmt
#         self.options = parse_options(
#             layers=layers,
#             styles=styles,
#             transparent=transparent,
#             version=version,
#             attribution=attr,
#             **kwargs
#         )


# Path: folium/plugins/timestamped_wmstilelayer.py
from folium.elements import JSCSSMixin
from folium.map import Layer
from folium.raster_layers import WmsTileLayer
from folium.utilities import parse_options
from jinja2 import Template

    ...          styles='',
    ...          fmt='image/png',
    ...          transparent=True,
    ...          layers='test_data',
    ...          COLORSCALERANGE='0,10',
    ...)
    >>> w0.add_to(m)
    >>> w1 = WmsTileLayer(
    ...          'http://this.wms.server/ncWMS/wms',
    ...          name='Test WMS Data',
    ...          styles='',
    ...          fmt='image/png',
    ...          transparent=True,
    ...          layers='test_data_2',
    ...          COLORSCALERANGE='0,5',
    ...)
    >>> w1.add_to(m)
    >>> # Add WmsTileLayers to time control.
    >>> time = TimestampedWmsTileLayers([w0, w1])
    >>> time.add_to(m)

    See https://github.com/socib/Leaflet.TimeDimension for more information.

    """
    _template = Template("""
        {% macro script(this, kwargs) %}
            {{ this._parent.get_name() }}.timeDimension = L.timeDimension(
                {{ this.options|tojson }}
            );
            {{ this._parent.get_name() }}.timeDimensionControl =

                L.control.timeDimension(