Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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,