MCPcopy
hub / github.com/python-visualization/folium / __init__

Method __init__

folium/plugins/timeline.py:208–246  ·  view source on GitHub ↗
(
        self,
        # arguments relevant to both interval and timestamp mode
        auto_play: bool = True,
        date_options: str = "YYYY-MM-DD HH:mm:ss",
        start: Optional[Union[str, int, float]] = None,
        end: Optional[Union[str, int, float]] = None,
        enable_playback: bool = True,
        enable_keyboard_controls: bool = False,
        show_ticks: bool = True,
        steps: int = 1000,
        playback_duration: int = 10000,
        **kwargs
    )

Source from the content-addressed store, hash-verified

206 ]
207
208 def __init__(
209 self,
210 # arguments relevant to both interval and timestamp mode
211 auto_play: bool = True,
212 date_options: str = "YYYY-MM-DD HH:mm:ss",
213 start: Optional[Union[str, int, float]] = None,
214 end: Optional[Union[str, int, float]] = None,
215 enable_playback: bool = True,
216 enable_keyboard_controls: bool = False,
217 show_ticks: bool = True,
218 steps: int = 1000,
219 playback_duration: int = 10000,
220 **kwargs
221 ):
222 super().__init__()
223 self._name = "TimelineSlider"
224
225 kwargs["auto_play"] = auto_play
226 kwargs["start"] = start
227 kwargs["end"] = end
228 kwargs["enable_playback"] = enable_playback
229 kwargs["enable_keyboard_controls"] = enable_keyboard_controls
230 kwargs["show_ticks"] = show_ticks
231 kwargs["steps"] = steps
232 kwargs["duration"] = playback_duration
233
234 kwargs["format_output"] = JsCode(
235 """
236 function(date) {
237 var newdate = new moment(date);
238 return newdate.format(\""""
239 + date_options
240 + """\");
241 }
242 """
243 )
244
245 self.timelines: List[Timeline] = []
246 self.options = remove_empty(**kwargs)
247
248 def add_timelines(self, *args):
249 """Add timelines to the control"""

Callers

nothing calls this directly

Calls 3

JsCodeClass · 0.90
remove_emptyFunction · 0.90
__init__Method · 0.45

Tested by

no test coverage detected