Dash Leaflet
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
pip install dash-leaflet
Once the installation is completed, paste the following lines of code into a .py file and run it.
from dash import Dash
import dash_leaflet as dl
app = Dash()
app.layout = dl.Map(dl.TileLayer(), style={'height': '50vh'}, center=[56, 10], zoom=6)
if __name__ == '__main__':
app.run_server()
That's it! If you visit http://127.0.0.1:8050/ in your browser, you should see a Leaflet map.
Documentation
The documentation has been moved to a separate page to enable an interactive example gallery.
NB: The 1.0.0 release contains a wide range of breaking changes, please refer to the migration guidelines
Support
Please ask questions on StackOverflow using the dash-leaflet tag, use GitHub issues only for bug reports.
Build instructions
Start by cloning this repository,
git clone git@github.com:thedirtyfew/dash-leaflet.git
cd dash-leaflet
Next, create a virtual environment and install the python dependencies (make sure to have Python 3.12 and uv installed),
uv venv && source .venv/bin/activate && uv sync
Finally, install packages via npm (ignore errors) and run the build script,
npm i --ignore-scripts
npm run build
Donation
Metadata
Release files for dash-leaflet 1.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dash_leaflet-1.1.3.tar.gz | 250.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dash_leaflet-1.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 544.9 kB
Release files / dash_leaflet-1.1.3.tar.gz
| Download URL | dash_leaflet-1.1.3.tar.gz |
|---|---|
| Size | 250.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc7c6da57b71715cfda5ac187ead2ac600f54ccc2cfac8c396f2f426f75f40ce
|
|
BLAKE2b-256 checksum How to use checksums |
c9194fd29ef8db9c6a5a73a34714ccca8349c8825c836adb98451c46457bd2e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.4
|
Release files / dash_leaflet-1.1.3-py3-none-any.whl
| Download URL | dash_leaflet-1.1.3-py3-none-any.whl |
|---|---|
| Size | 294.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8c8d761c0eb6817812afab1b0ca21fb2272515901795db581f7154f208051f37
|
|
BLAKE2b-256 checksum How to use checksums |
1c1ac1d6576f93f8e67d71c0218e1c9493055cb724b035615d930ee08ca34419
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.4
|