Skip to content

Commit f743136

Browse files
authored
TimestampedWmsTileLayers inherit from MacroElement, not Layer (#1696)
1 parent de7e87f commit f743136

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

folium/plugins/timestamped_wmstilelayer.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1+
from branca.element import MacroElement
12
from jinja2 import Template
23

34
from folium.elements import JSCSSMixin
4-
from folium.map import Layer
55
from folium.raster_layers import WmsTileLayer
66
from folium.utilities import parse_options
77

88

9-
class TimestampedWmsTileLayers(JSCSSMixin, Layer):
9+
class TimestampedWmsTileLayers(JSCSSMixin, MacroElement):
1010
"""
1111
Creates a TimestampedWmsTileLayer that takes a WmsTileLayer and adds time
1212
control with the Leaflet.TimeDimension plugin.
@@ -31,14 +31,6 @@ class TimestampedWmsTileLayers(JSCSSMixin, Layer):
3131
from the first available time. Format: ISO8601 Duration
3232
ex: 'P1M' -> 1/month, 'P1D' -> 1/day, 'PT1H' -> 1/hour, and 'PT1M' -> 1/minute
3333
Note: this seems to be overridden by the WMS Tile Layer GetCapabilities.
34-
name : string, default None
35-
The name of the Layer, as it will appear in LayerControls.
36-
overlay : bool, default True
37-
Adds the layer as an optional overlay (True) or the base layer (False).
38-
control : bool, default True
39-
Whether the Layer will be included in LayerControls.
40-
show: bool, default True
41-
Whether the layer will be shown on opening (only for overlays).
4234
4335
Examples
4436
--------
@@ -134,9 +126,8 @@ def __init__(
134126
auto_play=False,
135127
period="P1D",
136128
time_interval=False,
137-
name=None,
138129
):
139-
super().__init__(name=name, overlay=True, control=False, show=True)
130+
super().__init__()
140131
self._name = "TimestampedWmsTileLayers"
141132
self.options = parse_options(
142133
period=period,

0 commit comments

Comments
 (0)