Click State Update Delay for PyDeck Map

Ok @Marc @carl @maximlt, we’re in the home stretch. @maximlt provided a critical puzzle piece. My intuition said to take a look at a DeckGL example for Panel using a JSON spec. In the spec, I saw where I could make the change to ‘controller’ to turn off the double click zoom as referenced in the GitHub issue @maximlt identified. And boom, it worked! The delay is gone. See this notebook on Colab for pre and post demonstrations of the click performance. Now the final question to chase down - how does one make the same assertion via PyDeck?

And there’s another question lingering in my mind - should Panel have this flag set to False as a default for DeckGL visualizations? I’m thinking yes.

1 Like

And here’s the final piece of the puzzle.

When constructing a PyDeck visualization in pure Python, a view object is required to set the controller.

view = pdk.View(type="MapView", controller={"doubleClickZoom": False})

Then the view object is added as a parameter when creating the Deck object.

r = pdk.Deck(
    ...
    views=[view]
)

I have a working example now that is as performant as we expected possible. Thank you @Marc @carl and @maximlt for helping to make this happen! This is a huge win for me. Been wrestling with this off and on for over a year now.

2 Likes

Now @Marc if you can help me get a working custom tooltip, I’ll really be in high heaven… :wink:

1 Like

Could you ask your question with a mimimum, reproducible example in a new post? :+1:

No worries @Marc - we already communicated about the issue I’m referring to here. :+1:

1 Like

Very happy we’ve managed to help you @diehl ! Could you please open an issue on Panel’s Github repository, so that maintainers can discuss about disabling the double click feature by default, or at least for them to have a way to track that this should be documented, as the slow down is indeed quite large otherwise.

1 Like

This is a sweet victory @maximlt - thank you again! It’s my pleasure to document the solution paths. As you requested, I’ve opened this Github issue to document how to resolve the click state update delay for both Deck.GL and PyDeck visualizations in Panel. I used the examples from the Panel documentation in the notebook to make it very easy to map the solution paths back to the code already present. Hope this helps!

1 Like