Skip to content

Commit fc642d6

Browse files
authored
fix(flet-map): PolylineLayer not showing up in UI (#5794)
* fix: update children filter in `PolylineLayerControl` to use `polylines` and `PolylineMarker` * more docs * docs: add example URL for tile layer documentation * fix: update documentation for image repeat modes in `types.py`
1 parent 840dde9 commit fc642d6

File tree

3 files changed

+32
-19
lines changed

3 files changed

+32
-19
lines changed

sdk/python/packages/flet-map/src/flet_map/tile_layer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ class TileLayer(MapLayer):
2828
"""
2929
The URL template is a string that contains placeholders,
3030
which, when filled in, create a URL/URI to a specific tile.
31+
32+
Examples: https://wiki.openstreetmap.org/wiki/Raster_tile_providers
3133
"""
3234

3335
fallback_url: Optional[str] = None

sdk/python/packages/flet-map/src/flutter/flet_map/lib/src/polyline_layer.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ class PolylineLayerControl extends StatelessWidget with FletStoreMixin {
1414
debugPrint("PolylineLayerControl build: ${control.id}");
1515

1616
var polylines = control
17-
.children("polygons")
18-
.where((c) => c.type == "PolygonMarker")
17+
.children("polylines")
18+
.where((c) => c.type == "PolylineMarker")
1919
.map((polyline) {
2020
return Polyline(
2121
borderStrokeWidth: polyline.getDouble("border_stroke_width", 0)!,

sdk/python/packages/flet/src/flet/controls/types.py

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -466,9 +466,16 @@ class ImageRepeat(Enum):
466466
"""
467467

468468
NO_REPEAT = "noRepeat"
469+
"""Leave uncovered portions of the box transparent."""
470+
469471
REPEAT = "repeat"
472+
"""Repeat the image in both the x and y directions until the box is filled."""
473+
470474
REPEAT_X = "repeatX"
475+
"""Repeat the image in the x direction until the box is filled horizontally."""
476+
471477
REPEAT_Y = "repeatY"
478+
"""Repeat the image in the y direction until the box is filled vertically."""
472479

473480

474481
class PagePlatform(Enum):
@@ -1000,39 +1007,44 @@ class VisualDensity(Enum):
10001007

10011008
STANDARD = "standard"
10021009
"""
1003-
The default profile for VisualDensity. This default value represents a visual
1004-
density that is less dense than either `comfortable` or `compact`, and corresponds
1005-
to density values of zero in both axes.
1010+
The default/standard profile for visual density.
1011+
1012+
This default value represents a visual density that is less dense than
1013+
either [`COMFORTABLE`][(c).] or [`COMPACT`][(c).], and corresponds to
1014+
density values of zero in both axes.
10061015
"""
10071016

10081017
COMPACT = "compact"
10091018
"""
1010-
The profile for a "compact" interpretation of VisualDensity.
1019+
The profile for a "compact" interpretation of visual density.
10111020
10121021
Individual components will interpret the density value independently, making
1013-
themselves more visually dense than `standard` and `comfortable` to different
1014-
degrees based on the Material Design specification of the `comfortable` setting for
1015-
their particular use case.
1022+
themselves more visually dense than [`STANDARD`][(c).] and [`COMFORTABLE`][(c).] to
1023+
different degrees based on the Material Design specification of the
1024+
[`COMFORTABLE`][(c).] setting for their particular use case.
10161025
1017-
It corresponds to a density value of -2 in both axes.
1026+
It corresponds to a density value of `-2` in both axes.
10181027
"""
10191028

10201029
COMFORTABLE = "comfortable"
10211030
"""
1022-
The profile for a `comfortable` interpretation of `VisualDensity`. Individual
1031+
The profile for a "comfortable" interpretation of visual density.
1032+
1033+
Individual
10231034
components will interpret the density value independently, making themselves more
1024-
visually dense than `standard` and less dense than `compact` to different degrees
1025-
based on the Material Design specification of the `comfortable` setting for their
1026-
particular use case.
1035+
visually dense than [`STANDARD`][(c).] and less dense than [`COMPACT`][(c).]
1036+
to different degrees based on the Material Design specification of the
1037+
comfortable setting for their particular use case.
10271038
1028-
It corresponds to a density value of -1 in both axes.
1039+
It corresponds to a density value of `-1` in both axes.
10291040
"""
10301041

10311042
ADAPTIVE_PLATFORM_DENSITY = "adaptivePlatformDensity"
10321043
"""
1033-
Visual density that is adaptive based on the given platform. For desktop platforms,
1034-
this returns `compact`, and for other platforms, it returns a default-constructed
1035-
VisualDensity.
1044+
Visual density that is adaptive based on the given platform.
1045+
1046+
For desktop platforms, this returns [`COMPACT`][(c).], and for other platforms,
1047+
it returns a default-constructed visual density.
10361048
"""
10371049

10381050

@@ -1098,7 +1110,6 @@ class LocaleConfiguration:
10981110
Represents a string or a control and can be:
10991111
- a string, which will be converted internally into a [`Text`][flet.] control,
11001112
- or a control.
1101-
11021113
"""
11031114

11041115
# Wrapper

0 commit comments

Comments
 (0)