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.
Project description
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==2.12.1
pip install dash-leaflet==1.0.0
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,
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
Donation
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
Built Distribution
Hashes for dash_leaflet-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3dafefaeba958822f36bfbc9f444758b62549b7323fac111f1410b0bf1478ad |
|
MD5 | 361f307acb46094370fb1d96f308aa4c |
|
BLAKE2b-256 | 7e777cc9c4d54a636c571dfd8c26de338d753b1a6b66be496ed33780d34587d2 |