Skip to content
Make with

leafmap

Python package with MapLibre backend support

Maintained by OpenGeoHub

leafmap is a Python package for interactive mapping and geospatial analysis with multiple backend support including MapLibre. It provides an easy-to-use interface for creating interactive maps, analyzing geospatial data, and building geospatial applications in Python.

Quick start

pip install "leafmap[maplibre]"
import leafmap.maplibregl as leafmap

m = leafmap.Map(
    center=[-100, 40],
    zoom=3,
    style="https://tiles.openfreemap.org/styles/liberty",
)
m
›Setup noteschecked with v0.63.1

Run it in a Jupyter notebook: the bare m on the last line displays the map. The maplibre extra installs py-maplibregl and anywidget. The style argument also takes names such as "positron" or "dark-matter".

Other platforms are on SDKs.