{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "0.5.0+27.g2d457b0.dirty\n" ] } ], "source": [ "import os\n", "import folium\n", "\n", "print(folium.__version__)" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
" ], "text/plain": [ "" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "\n", "m = folium.Map(location=[22.5, -115], zoom_start=4)\n", "\n", "video = folium.raster_layers.VideoOverlay(\n", " video_url='https://www.mapbox.com/bites/00188/patricia_nasa.webm',\n", " bounds=[[32, -130], [13, -100]],\n", " opacity=0.65,\n", " attr='Video from patricia_nasa',\n", " autoplay=True,\n", " loop=False,\n", ")\n", "\n", "video.add_to(m)\n", "\n", "m.save(os.path.join('results', 'VideoOverlayLayer.html'))\n", "\n", "m" ] } ], "metadata": { "_draft": { "nbviewer_url": "https://gist.github.com/629da6f621481ed4d513258d2ec64589" }, "gist": { "data": { "description": "folium video test", "public": true }, "id": "629da6f621481ed4d513258d2ec64589" }, "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.2" } }, "nbformat": 4, "nbformat_minor": 2 }