deck.gl icon indicating copy to clipboard operation
deck.gl copied to clipboard

Add a fullscreen control to a map

Open giswqs opened this issue 3 years ago • 7 comments

Is it possible to add a fullscreen control to a pydeck map? Similar to the Mapbox GL JS?

https://docs.mapbox.com/mapbox-gl-js/example/fullscreen image

giswqs avatar Oct 10 '21 02:10 giswqs

Is this it? https://visgl.github.io/react-map-gl/docs/api-reference/fullscreen-control/

But is it exposed on the python / pydeck side?

andhuang-CLGX avatar Jan 21 '22 23:01 andhuang-CLGX

On the JS side you can add the full screen control from react-map-gl. I don't believe there's currently a way to do this through Pydeck.

kylebarron avatar Jan 24 '22 20:01 kylebarron

Does pydeck expose any hooks to the JS side (i.e. add additional JS to add full screen)

andhuang-CLGX avatar Jan 24 '22 20:01 andhuang-CLGX

Both folium and ipyleaflet have the fullscreen button. It would be nice if pydeck can have it as well.

giswqs avatar Jan 24 '22 20:01 giswqs

Is there a way to combine https://visgl.github.io/react-map-gl/docs/api-reference/fullscreen-control with https://deck.gl/docs/api-reference/json/conversion-reference

andhuang-CLGX avatar Jan 26 '22 19:01 andhuang-CLGX

SO HERE WE GO!!! HACK SOLUTION Use react-map-gl Components with DeckGL For React users, it is now easy to use react-map-gl components with DeckGL, including DOM-based marker, popup, navigation control and fullscreen control. This can be done by supplying the ContextProvider prop on DeckGL:

/// Example using react-map-gl controls with deck.gl Untitled

Jamal8548 avatar Feb 24 '22 09:02 Jamal8548

The above mentioned solution is only react-map-gl version below 7. v7 does not work with Deckgl.

Jamal8548 avatar Feb 24 '22 13:02 Jamal8548

Is there any update on this? Besides full-screen control, it would be nice too to have NavigationControl exposed through pydeck.

chjch avatar Mar 22 '23 03:03 chjch