Skip to main content

PolygonMarker

A marker for the PolygonLayer.

Inherits: Control

Properties

Properties

border_colorclass-attributeinstance-attribute

border_color: ColorValue = Colors.GREEN

The color of the border outline.

border_stroke_widthclass-attributeinstance-attribute

border_stroke_width: Number = 0.0

The width of the border outline.

Raises:

  • ValueError - If it is less than 0.0.

colorclass-attributeinstance-attribute

The color of the polygon.

coordinatesinstance-attribute

coordinates: list[MapLatitudeLongitude]

The points for the outline of this polygon.

disable_holes_borderclass-attributeinstance-attribute

disable_holes_border: bool = False

Whether holes should have borders.

labelclass-attributeinstance-attribute

label: Optional[str] = None

An optional label for this polygon.

Note

Specifying a label will reduce performance, as the internal canvas must be drawn to and 'saved' more frequently to ensure the proper stacking order is maintained. This can be avoided, potentially at the expense of appearance, by setting flet_map.PolygonLayer.draw_labels_last.

label_text_styleclass-attributeinstance-attribute

label_text_style: Optional[TextStyle] = None

The text style for the label.

rotate_labelclass-attributeinstance-attribute

rotate_label: bool = False

Whether to rotate the label counter to the camera's rotation, to ensure it remains upright.

stroke_capclass-attributeinstance-attribute

stroke_cap: StrokeCap = StrokeCap.ROUND

Style to use for line endings.

stroke_joinclass-attributeinstance-attribute

stroke_join: StrokeJoin = StrokeJoin.ROUND

Style to use for line segment joins.