foliplus.Fullscreen#
- class foliplus.Fullscreen(*, position: Literal['topleft', 'topright', 'bottomleft', 'bottomright'] = 'bottomright', hide_self: bool = True, locale: str | LocaleConfig | None = None)[source]#
Bases:
BaseControlFullscreen toggle with auto-hide for other controls.
When toggling fullscreen, other controls (HeatmapControl, LayerControl, ScaleControl , MapSearch, MeasureControl, etc.), inside
.leaflet-control-containerare automatically hidden/shown for a cleaner view.Parameters#
- positionstr, default “bottomright”
One of
"topleft","topright","bottomleft","bottomright".- hide_selfbool, default True
Whether to hide the fullscreen button itself after entering fullscreen. Users can exit via the
Esckey.- localestr or LocaleConfig, optional
Language code (
"en","zh") or aLocaleConfiginstance. Defaults to auto-detection, falling back to English.
Examples#
>>> import folium >>> from foliplus import Fullscreen >>> m = folium.Map() >>> Fullscreen().add_to(m)
- __init__(*, position: Literal['topleft', 'topright', 'bottomleft', 'bottomright'] = 'bottomright', hide_self: bool = True, locale: str | LocaleConfig | None = None)[source]#
Methods
__init__(*[, position, hide_self, locale])add_child(child[, name, index])Add a child.
add_children(child[, name, index])Add a child.
add_css_link(name, url)Add or update css resource link.
add_js_link(name, url)Add or update JS resource link.
add_to(parent[, name, index])Add element to a parent.
get_bounds()Computes the bounds of the object and all it's children in the form [[lat_min, lon_min], [lat_max, lon_max]].
get_name()Returns a string representation of the object.
get_root()Returns the root of the elements tree.
render(**kwargs)Renders the HTML representation of the element.
save(outfile[, close_file])Saves an Element into a file.
to_dict([depth, ordered])Returns a dict representation of the object.
to_json([depth])Returns a JSON representation of the object.
Attributes
default_cssdefault_js