Used to load and display a video over the map. Parameters ---------- video_url: str URL of the video bounds: list/tuple of list/tuple of float Video bounds on the map in the form [[lat_min, lon_min], [lat_max, lon_max]] autoplay: bool, default True
| 349 | |
| 350 | |
| 351 | class VideoOverlay(Layer): |
| 352 | """ |
| 353 | Used to load and display a video over the map. |
| 354 | |
| 355 | Parameters |
| 356 | ---------- |
| 357 | video_url: str |
| 358 | URL of the video |
| 359 | bounds: list/tuple of list/tuple of float |
| 360 | Video bounds on the map in the form |
| 361 | [[lat_min, lon_min], [lat_max, lon_max]] |
| 362 | autoplay: bool, default True |
| 363 | loop: bool, default True |
| 364 | name : string, default None |
| 365 | The name of the Layer, as it will appear in LayerControls |
| 366 | overlay : bool, default True |
| 367 | Adds the layer as an optional overlay (True) or the base layer (False). |
| 368 | control : bool, default True |
| 369 | Whether the Layer will be included in LayerControls. |
| 370 | show: bool, default True |
| 371 | Whether the layer will be shown on opening. |
| 372 | **kwargs: |
| 373 | Other valid (possibly inherited) options. See: |
| 374 | https://leafletjs.com/reference.html#videooverlay |
| 375 | |
| 376 | """ |
| 377 | |
| 378 | _template = Template( |
| 379 | """ |
| 380 | {% macro script(this, kwargs) %} |
| 381 | var {{ this.get_name() }} = L.videoOverlay( |
| 382 | {{ this.video_url|tojson }}, |
| 383 | {{ this.bounds|tojson }}, |
| 384 | {{ this.options|tojavascript }} |
| 385 | ); |
| 386 | {% endmacro %} |
| 387 | """ |
| 388 | ) |
| 389 | |
| 390 | def __init__( |
| 391 | self, |
| 392 | video_url: str, |
| 393 | bounds: TypeBounds, |
| 394 | autoplay: bool = True, |
| 395 | loop: bool = True, |
| 396 | name: Optional[str] = None, |
| 397 | overlay: bool = True, |
| 398 | control: bool = True, |
| 399 | show: bool = True, |
| 400 | **kwargs: TypeJsonValue, |
| 401 | ): |
| 402 | super().__init__(name=name, overlay=overlay, control=control, show=show) |
| 403 | self._name = "VideoOverlay" |
| 404 | self.video_url = video_url |
| 405 | |
| 406 | self.bounds = bounds |
| 407 | self.options = remove_empty(autoplay=autoplay, loop=loop, **kwargs) |
| 408 |
nothing calls this directly
no test coverage detected
searching dependent graphs…