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==1.16.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.

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

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-0.1.5rc3.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

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

dash_leaflet-0.1.5rc3-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

Details for the file dash_leaflet-0.1.5rc3.tar.gz.

File metadata

  • Download URL: dash_leaflet-0.1.5rc3.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for dash_leaflet-0.1.5rc3.tar.gz
Algorithm Hash digest
SHA256 8486b086bc0b31c793ac541635cfdae9cbb242df2a461d80ec18bbe10442da0a
MD5 5acfb344870810f5fbc770fa479526d1
BLAKE2b-256 744d2b74f2560a4ac9ec8c64501de0b6994141763bcfdd093ec8bd1f72815f6f

See more details on using hashes here.

File details

Details for the file dash_leaflet-0.1.5rc3-py3-none-any.whl.

File metadata

  • Download URL: dash_leaflet-0.1.5rc3-py3-none-any.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.0

File hashes

Hashes for dash_leaflet-0.1.5rc3-py3-none-any.whl
Algorithm Hash digest
SHA256 beb8fb6ba4f40f7859607dd5c4410dfb1bc27c0fbcb2226e58100fa3b79f830a
MD5 b32bad3e5160ba0ba5038a63361e8ae6
BLAKE2b-256 cf22a605c4cfa9fbbd1d601b67be6f691ff9c5ae339a1e1490b7656f6524519a

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