Skip to main content

Leaflet component for Dash

Project description

Dash Leaflet is a light wrapper around React-Leaflet. The syntax is similar to other Dash components, with naming conventions following the React-Leaflet API.

Getting started

The easiest way to get started is to install the latest version of Dash and Dash Leaflet via pip.

pip install dash==2.0.0
pip install dash-leaflet

Once the installation is completed, paste the following lines of code into a .py file and run it.

import dash
import dash_leaflet as dl

app = dash.Dash()
app.layout = dl.Map(dl.TileLayer(), style={'width': '1000px', 'height': '500px'})

if __name__ == '__main__':

If you visit in your browser, you should see a Leaflet map.


The documentation has been moved to Heroku to enable an interactive example gallery.

NB: The 0.1.0 release contains a number breaking changes, most prominently merging of the SuperCluster and GeoJSON components into a new GeoJSON component powered by functional properties.

Build instructions

Start by cloning this repository,

git clone
cd dash-leaflet

Next, create a virtual environment and install the python dependencies,

python3 -m venv venv && . venv/bin/activate
pip install -r requirements.txt

Finally, install packages via npm (ignore errors) and run the build script,

npm i --ignore-scripts
npm run build



Project details

Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dash_leaflet-0.1.23.tar.gz (1.8 MB view hashes)

Uploaded source

Built Distribution

dash_leaflet-0.1.23-py3-none-any.whl (1.9 MB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page