Leaflet component for Dash
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==1.12.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__':
app.run_server()
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 Heroku to enable an interactive example gallery.
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:all
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-0.0.22-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b33e1aba7e76930466a097bbce016b7fc67ac223220ebf552a2742171ae1372 |
|
MD5 | b239542da33e463bf97dd642d5ba57d6 |
|
BLAKE2b-256 | 373a5e4c275c210ee2e5877ae23b07e054a593ecd9e09532a6d83ac201cb74b1 |