Skip to content

SourceAttribution

SourceAttribution #

Bases: BaseControl

Abstract class for source attribution controls: ImageSourceAttribution and TextSourceAttribution

ImageSourceAttribution #

Bases: SourceAttribution

An image attribution permanently displayed adjacent to the open/close icon of a RichAttribution control. For it to be displayed, it should be part of a RichAttribution.attributions list.

height: ft.OptionalNumber = 24.0 #

The height of the image. Should be the same as RichAttribution.permanent_height, otherwise layout issues may occur.

Defaults to 24.0.

image: ft.Image #

The Image to be displayed.

on_click: ft.OptionalControlEventCallable = None #

Fired when this attribution is clicked/pressed.

tooltip: ft.OptionalString = None #

Tooltip text to be displayed when the image is hovered over.

TextSourceAttribution #

Bases: SourceAttribution

A text source attribution displayed on the Map. For it to be displayed, it should be part of a RichAttribution.attributions list.

on_click: ft.OptionalControlEventCallable = None #

Fired when this attribution is clicked/pressed.

Whether to add the '©' character to the start of text automatically.

Defaults to True.

text: str #

The text to display as attribution, styled with text_style.

text_style: ft.OptionalTextStyle = None #

Style used to display the text.