A Jupyter / Leaflet bridge enabling interactive maps in the Jupyter notebook.
Using conda:
conda install -c conda-forge ipyleaflet
Using pip:
pip install ipyleaflet
If you are using the classic Jupyter Notebook < 5.3 you need to run this extra command:
jupyter nbextension enable --py --sys-prefix ipyleaflet
If you are using JupyterLab <=2, you will need to install the JupyterLab extension:
jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-leaflet
For a development installation (requires yarn, you can install it with conda install -c conda-forge yarn
):
git clone https://github.com/jupyter-widgets/ipyleaflet.git
cd ipyleaflet
(cd python/ipyleaflet_core; pip install -e .)
(cd python/jupyter_leaflet ; pip install -e .)
(cd python/ipyleaflet; pip install -e .)
If you are using the classic Jupyter Notebook you need to install the nbextension:
jupyter nbextension install --py --symlink --sys-prefix --overwrite ipyleaflet
jupyter nbextension enable --py --sys-prefix ipyleaflet
Note for developers:
- the
-e
pip option allows one to modify the Python code in-place. Restart the kernel in order to see the changes. - the
--symlink
argument on Linux or OS X allows one to modify the JavaScript code in-place. This feature is not available with Windows.
For developing with JupyterLab:
jupyter labextension develop --overwrite ipyleaflet
To get started with using ipyleaflet
, check out the full documentation
https://ipyleaflet.readthedocs.io/
We use a shared copyright model that enables all contributors to maintain the copyright on their contributions.
This software is licensed under the MIT license. See the LICENSE file for details.
The ipyleaflet
repository includes the jupyter-leaflet
npm package, which
is a front-end component, and the ipyleaflet
python package which is the
backend for the Python Jupyter kernel.
Similarly, the xleaflet
project
provides a backend to jupyter-leaflet
for the "xeus-cling" C++ Jupyter
kernel.