How to use the pydeck.ViewState function in pydeck

To help you get started, we’ve selected a few pydeck examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rapidsai / cuxfilter / python / cuxfilter / charts / deckgl / bindings / panel_deck.py View on Github external
def __init__(self, **params):
        """
        initialize pydeck object, and set a listener on self.data
        """
        super(PanelDeck, self).__init__(**params)
        self._view_state = pdk.ViewState(
            **self.spec["initialViewState"], bearing=0.45,
        )
        self._layers = pdk.Layer(
            "PolygonLayer", data=self.data, **self.spec["layers"][0]
        )
        self._tooltip = {"html": self.get_tooltip_html()}

        self._deck = pdk.Deck(
            mapbox_key=self.spec["mapboxApiAccessToken"],
            layers=[self._layers],
            initial_view_state=self._view_state,
            tooltip=self._tooltip,
        )
        self.pane = pn.pane.DeckGL(
            self._deck,
            sizing_mode=self.sizing_mode,

pydeck

Widget for deck.gl maps

MIT
Latest version published 7 months ago

Package Health Score

95 / 100
Full package analysis

Similar packages