ipyleaflet

0.20.0 · active · verified Thu Apr 16

ipyleaflet is a Jupyter widget for Leaflet.js, enabling the creation of interactive maps directly within Jupyter Notebook and JupyterLab environments. It currently stands at version 0.20.0 and maintains an active development pace with several releases throughout the year, adding new features and addressing bugs.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to create a basic interactive map and add a draggable marker using ipyleaflet within a Jupyter environment.

from ipyleaflet import Map, Marker

# Create a map centered at a specific location
m = Map(center=(52.204793, 0.121558), zoom=10)

# Add a marker
marker = Marker(location=(52.204793, 0.121558), draggable=True)
m.add_layer(marker)

# Display the map (in Jupyter environment)
m

view raw JSON →