Skip to main content

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
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,

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

paypal

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-1.0.9.tar.gz (242.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dash_leaflet-1.0.9-py3-none-any.whl (284.8 kB view details)

Uploaded Python 3

File details

Details for the file dash_leaflet-1.0.9.tar.gz.

File metadata

  • Download URL: dash_leaflet-1.0.9.tar.gz
  • Upload date:
  • Size: 242.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for dash_leaflet-1.0.9.tar.gz
Algorithm Hash digest
SHA256 017ea5a9ae7f0ed691449694463c2408c943f535bcb27b04b381ed38471a6184
MD5 211c7bfc5f66df8931ec6773c9318ea8
BLAKE2b-256 b640a67604088f85380ffb7ae7c551eb62af7dad4ad138d2fa9c0dffc1386763

See more details on using hashes here.

File details

Details for the file dash_leaflet-1.0.9-py3-none-any.whl.

File metadata

  • Download URL: dash_leaflet-1.0.9-py3-none-any.whl
  • Upload date:
  • Size: 284.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for dash_leaflet-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 c0f36b8bd11f884ac8235fc4e70b06a757bbc3a86ba6a595f098fd295261b808
MD5 dde7874406440715dc20df84dd92e122
BLAKE2b-256 e075067cc120e3160b4a1dd6e538718d435fe99f90365e611e6320234d382b32

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page