Skip to content

Commit

Permalink
Support multiple layers on a single map (#34)
Browse files Browse the repository at this point in the history
* attempt async use effect

* scratch work

* wip

* simplify js model

* flesh out model

* Clean up model state transfer

* Remove existing callbacks

* Add initial view state to Map

* separate function for sub model state

* remove empty file

* bump version
  • Loading branch information
kylebarron authored Oct 31, 2023
1 parent d4a05a3 commit 0f9518a
Show file tree
Hide file tree
Showing 7 changed files with 1,051 additions and 146 deletions.
4 changes: 3 additions & 1 deletion lonboard/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@

# bundler yields lonboard/static/{index.js,styles.css}
bundler_output_dir = Path(__file__).parent / "static"
_css = bundler_output_dir / "styles.css"


class Map(anywidget.AnyWidget):
_esm = bundler_output_dir / "index.js"
_css = bundler_output_dir / "index.css"

_initial_view_state = traitlets.Dict().tag(sync=True)

layers = traitlets.List(trait=traitlets.Instance(BaseLayer)).tag(
sync=True, **ipywidgets.widget_serialization
Expand Down
Loading

0 comments on commit 0f9518a

Please sign in to comment.