sepal_ui.mapping.fullscreen_control.FullScreenControl#

class sepal_ui.mapping.fullscreen_control.FullScreenControl(**kwargs)[source]#

A custom Fullscreen Button ready to be embed in a map object.

This button will force the display of the map in fullscreen mode. It should be used instead of the built-in ipyleaflet FullscreenControl if your map is embedding ipyvuetify widgets. I tends to solve the issue raised here: widgetti/ipyvuetify#141. The idea is to fake the fullscreen display by forcing the map container to extend to the full extend of the screen without using a z-index superior to the ipyvuetify overlay. simply click on it and the map will automatically expand

New in version 2.7.0.

Parameters:
  • m (Map) – the map on which the mutated CSS will be applied (Only work with SepalMap as we are querying the _id)

  • fullscreen (bool) – either the map should be displayed in fullscreen by default. default to false.

  • fullapp (bool) – either or not the map will be used as the sole widget/tile of an application

  • kwargs – any available arguments from a ipyleaflet WidgetControl

Attributes

ICONS

The icons that will be used to toggle between expand and compressed mode

METHODS

The javascript methods name to be used to switch from expand to compress mode

template

Embeds the 2 javascripts methods to change the rendering of the map

w_btn

the btn to display on the map

zoomed

True for expanded and False for compressed

Methods

__init__

A custom Fullscreen Button ready to be embed in a map object.

toggle_fullscreen

Toggle fullscreen state.

FullScreenControl.__init__(m, fullscreen=False, fullapp=False, **kwargs)[source]#

A custom Fullscreen Button ready to be embed in a map object.

This button will force the display of the map in fullscreen mode. It should be used instead of the built-in ipyleaflet FullscreenControl if your map is embedding ipyvuetify widgets. I tends to solve the issue raised here: widgetti/ipyvuetify#141. The idea is to fake the fullscreen display by forcing the map container to extend to the full extend of the screen without using a z-index superior to the ipyvuetify overlay. simply click on it and the map will automatically expand

New in version 2.7.0.

Parameters:
  • m (Map) – the map on which the mutated CSS will be applied (Only work with SepalMap as we are querying the _id)

  • fullscreen (bool) – either the map should be displayed in fullscreen by default. default to false.

  • fullapp (bool) – either or not the map will be used as the sole widget/tile of an application

  • kwargs – any available arguments from a ipyleaflet WidgetControl

Return type:

None

FullScreenControl.toggle_fullscreen(*args)[source]#

Toggle fullscreen state.

Toggle the fullscreen state of the map by sending the required javascript method, changing the w_btn icons and the zoomed state of the control.

Return type:

None