https://github.com/pikhovkin/dash-geoman
leaflet-geoman component for Dash
https://github.com/pikhovkin/dash-geoman
dash geoman leaflet leaflet-geoman leaflet-map leaflet-plugin map plotly plotly-dash
Last synced: 3 months ago
JSON representation
leaflet-geoman component for Dash
- Host: GitHub
- URL: https://github.com/pikhovkin/dash-geoman
- Owner: pikhovkin
- License: mit
- Created: 2022-07-09T15:49:15.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-12-09T18:12:35.000Z (over 3 years ago)
- Last Synced: 2026-01-08T03:16:43.613Z (3 months ago)
- Topics: dash, geoman, leaflet, leaflet-geoman, leaflet-map, leaflet-plugin, map, plotly, plotly-dash
- Language: JavaScript
- Homepage:
- Size: 106 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# dash-geoman
[](https://pypi.org/project/dash-geoman/)

[](https://www.npmjs.com/package/dash-geoman)
[](./LICENSE)
Wrapper of [leaflet-geoman][] components for Plotly [Dash][]
### Getting started
The easiest way to get started is to install the latest version of Dash and dash-geoman via pip.
```bash
pip install dash==2.0.0
pip install dash-geoman
```
Once the installation is completed, paste the following lines of code into a .py file and run it.
```python
import dash
import dash_leaflet as dl
import dash_geoman as dgm
app = dash.Dash()
app.layout = dl.Map(children=[
dl.TileLayer(),
dgm.Geoman(),
], 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 and `dash-geoman`'s edit controls.
### Documentation
### Build instructions
Start by cloning this repository,
```bash
git clone git@github.com:pikhovkin/dash-geoman.git
cd dash-geoman
```
Next, create a virtual environment and install the python dependencies,
```bash
python3 -m venv venv && . venv/bin/activate
pip install -r requirements.txt
```
Finally, install packages via npm (ignore errors) and run the build script,
```bash
npm i --ignore-scripts
npm run build
```
### License
MIT
[leaflet-geoman]: https://github.com/geoman-io/leaflet-geoman
[Dash]: https://github.com/plotly/dash