Closed MarcSkovMadsen closed 5 months ago
Thanks for trying out lonboard! I'm not familiar with panel, but glad to see that it works! Happy to add that to the docs or whatever makes sense.
When you select a new colormap, alpha, anything... the map element fully reloads... that's pretty bad. In particular, that seems really bad because all the map data will be re-parsed and re-rendered from scratch (and maybe even re-downloaded?). lonboard's architecture assumes that you have a stateful jupyter widget on the JS side, and so changing a colormap or the alpha should not create a new map. In particular, if things are wired up correctly, changing the alpha should be instantaneous (especially if you link the alpha to the opacity
attribute of the layer, instead of re-generating the colormap colors)
I'm not familiar with panel but there should be a way to persist an existing widget and mutate its state. You don't want to be creating a new map element from create_map
each time.
There's a panel page in the "ecosystem" section of the Lonboard docs, so I'll close this: https://developmentseed.org/lonboard/latest/ecosystem/panel/
Sorry. I never saw the question about in-place updates. I've added a PR to document this in https://github.com/developmentseed/lonboard/pull/539.
Thanks for adding the original example to the docs.
I checked it out and HoloViz Panel seems to work great with lonboard via its Ipywidgets/ Anywidgets support.
This could be quite useful to document. Let me know if you would accept a PR. Thanks.
https://github.com/developmentseed/lonboard/assets/42288570/5e62605d-a6e0-433b-b190-b7901579ca4f