Skip to content

Commit

Permalink
Refactor draw plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Kuethe committed Jun 23, 2024
1 parent 08b5a36 commit 5be811a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
10 changes: 9 additions & 1 deletion docs/examples/mapbox_draw_plugin/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from maplibre import Map, MapOptions, render_maplibregl
from maplibre.basemaps import Carto
from maplibre.controls import NavigationControl
from maplibre.controls import ControlPosition, NavigationControl
from maplibre.ui import use_mapboxgl_draw

# from shiny import reactive
Expand All @@ -21,6 +21,14 @@
)
m.add_control(NavigationControl())

draw_options = {
"displayControlsDefault": False,
"controls": {
"polygon": True,
"trash": True,
},
}
m.add_call("addMapboxDraw", draw_options, ControlPosition.TOP_LEFT.value)

# Shiny Express
use_mapboxgl_draw()
Expand Down
Loading

0 comments on commit 5be811a

Please sign in to comment.