SymbolLayerProperties class
Constructors
-
SymbolLayerProperties({dynamic iconOpacity, dynamic iconColor, dynamic iconHaloColor, dynamic iconHaloWidth, dynamic iconHaloBlur, dynamic iconTranslate, dynamic iconTranslateAnchor, dynamic textOpacity, dynamic textColor, dynamic textHaloColor, dynamic textHaloWidth, dynamic textHaloBlur, dynamic textTranslate, dynamic textTranslateAnchor, dynamic symbolPlacement, dynamic symbolSpacing, dynamic symbolAvoidEdges, dynamic symbolSortKey, dynamic symbolZOrder, dynamic iconAllowOverlap, dynamic iconOverlap, dynamic iconIgnorePlacement, dynamic iconOptional, dynamic iconRotationAlignment, dynamic iconSize, dynamic iconTextFit, dynamic iconTextFitPadding, dynamic iconImage, dynamic iconRotate, dynamic iconPadding, dynamic iconKeepUpright, dynamic iconOffset, dynamic iconAnchor, dynamic iconPitchAlignment, dynamic textPitchAlignment, dynamic textRotationAlignment, dynamic textField, dynamic textFont, dynamic textSize, dynamic textMaxWidth, dynamic textLineHeight, dynamic textLetterSpacing, dynamic textJustify, dynamic textVariableAnchor, dynamic textVariableAnchorOffset, dynamic textAnchor, dynamic textMaxAngle, dynamic textWritingMode, dynamic textRotate, dynamic textPadding, dynamic textKeepUpright, dynamic textTransform, dynamic textOffset, dynamic textAllowOverlap, dynamic textOverlap, dynamic textIgnorePlacement, dynamic textOptional, dynamic symbolHeightOffset, dynamic symbolHeightAnchor, dynamic visibility})
-
const
-
SymbolLayerProperties.fromJson(Map<String, dynamic> json)
-
factory
Properties
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
iconAllowOverlap
→ dynamic
-
If true, the icon will be visible even if it collides with other
previously drawn symbols.
final
-
iconAnchor
→ dynamic
-
Part of the icon placed closest to the anchor.
final
-
iconColor
→ dynamic
-
The color of the icon. This can only be used with SDF icons.
final
-
iconHaloBlur
→ dynamic
-
Fade out the halo towards the outside.
final
-
iconHaloColor
→ dynamic
-
The color of the icon's halo. Icon halos can only be used with SDF
icons.
final
-
iconHaloWidth
→ dynamic
-
Distance of halo to the icon outline.
final
-
iconIgnorePlacement
→ dynamic
-
If true, other symbols can be visible even if they collide with the
icon.
final
-
iconImage
→ dynamic
-
Name of image in sprite to use for drawing an image background.
final
-
iconKeepUpright
→ dynamic
-
If true, the icon may be flipped to prevent it from being rendered
upside-down.
final
-
iconOffset
→ dynamic
-
Offset distance of icon from its anchor. Positive values indicate
right and down, while negative values indicate left and up. Each
component is multiplied by the value of
icon-size
to obtain the final offset in pixels. When combined with
icon-rotate
the offset will be as if the rotated direction was up.
final
-
iconOpacity
→ dynamic
-
The opacity at which the icon will be drawn.
final
-
iconOptional
→ dynamic
-
If true, text will display without their corresponding icons when the
icon collides with other symbols and the text does not.
final
-
iconOverlap
→ dynamic
-
Allows for control over whether to show an icon when it overlaps other
symbols on the map. If
icon-overlap is not set,
icon-allow-overlap
is used instead.
final
-
iconPadding
→ dynamic
-
Size of additional area round the icon bounding box used for detecting
symbol collisions.
final
-
iconPitchAlignment
→ dynamic
-
Orientation of icon when map is pitched.
final
-
iconRotate
→ dynamic
-
Rotates the icon clockwise.
final
-
iconRotationAlignment
→ dynamic
-
In combination with
symbol-placement,
determines the rotation behavior of icons.
final
-
iconSize
→ dynamic
-
Scales the original size of the icon by the provided factor. The new
pixel size of the image will be the original pixel size multiplied by
icon-size. 1 is the original size; 3 triples the size of the image.
final
-
iconTextFit
→ dynamic
-
Scales the icon to fit around the associated text.
final
-
iconTextFitPadding
→ dynamic
-
Size of the additional area added to dimensions determined by
icon-text-fit,
in clockwise order: top, right, bottom, left.
final
-
iconTranslate
→ dynamic
-
Distance that the icon's anchor is moved from its original placement.
Positive values indicate right and down, while negative values
indicate left and up.
final
-
iconTranslateAnchor
→ dynamic
-
Controls the frame of reference for
icon-translate.
final
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
symbolAvoidEdges
→ dynamic
-
If true, the symbols will not cross tile edges to avoid mutual
collisions. Recommended in layers that don't have enough padding in
the vector tile to prevent collisions, or if it is a point symbol
layer placed after a line symbol layer. When using a client that
supports global collision detection, like MapLibre GL JS version
0.42.0 or greater, enabling this property is not needed to prevent
clipped labels at tile boundaries.
final
-
symbolHeightAnchor
→ dynamic
-
Defines what
symbol-height-offset
is measured from.
final
-
symbolHeightOffset
→ dynamic
-
The height above the anchor, in meters, at which the symbol is placed.
Use
symbol-height-anchor
to control what this height is measured from.
final
-
symbolPlacement
→ dynamic
-
Label placement relative to its geometry.
final
-
symbolSortKey
→ dynamic
-
Sorts features in ascending order based on this value. Features with
lower sort keys are drawn and placed first. When
icon-allow-overlap
or
text-allow-overlap
is false, features with a lower sort key will have priority during
placement. When icon-allow-overlap or text-allow-overlap is set to
true, features with a higher sort key will overlap over features
with a lower sort key.
final
-
symbolSpacing
→ dynamic
-
Distance between two symbol anchors.
final
-
symbolZOrder
→ dynamic
-
Determines whether overlapping symbols in the same layer are rendered
in the order that they appear in the data source or by their
y-position relative to the viewport. To control the order and
prioritization of symbols otherwise, use
symbol-sort-key.
final
-
textAllowOverlap
→ dynamic
-
If true, the text will be visible even if it collides with other
previously drawn symbols.
final
-
textAnchor
→ dynamic
-
Part of the text placed closest to the anchor.
final
-
textColor
→ dynamic
-
The color with which the text will be drawn.
final
-
textField
→ dynamic
-
Value to use for a text label. If a plain
string is provided, it
will be treated as a formatted with default/inherited formatting
options.
final
-
textFont
→ dynamic
-
Fonts to use for displaying text. If the
glyphs root property is
specified, this array is joined together and interpreted as a font
stack name. Otherwise, it is interpreted as a cascading fallback list
of local font names.
final
-
textHaloBlur
→ dynamic
-
The halo's fadeout distance towards the outside.
final
-
textHaloColor
→ dynamic
-
The color of the text's halo, which helps it stand out from
backgrounds.
final
-
textHaloWidth
→ dynamic
-
Distance of halo to the font outline. Max text halo width is 1/4 of
the font-size.
final
-
textIgnorePlacement
→ dynamic
-
If true, other symbols can be visible even if they collide with the
text.
final
-
textJustify
→ dynamic
-
Text justification options.
final
-
textKeepUpright
→ dynamic
-
If true, the text may be flipped vertically to prevent it from being
rendered upside-down.
final
-
textLetterSpacing
→ dynamic
-
Text tracking amount.
final
-
textLineHeight
→ dynamic
-
Text leading value for multi-line text.
final
-
textMaxAngle
→ dynamic
-
Maximum angle change between adjacent characters.
final
-
textMaxWidth
→ dynamic
-
The maximum line width for text wrapping.
final
-
textOffset
→ dynamic
-
Offset distance of text from its anchor. Positive values indicate
right and down, while negative values indicate left and up. If used
with text-variable-anchor, input values will be taken as absolute
values. Offsets along the x- and y-axis will be applied automatically
based on the anchor position.
final
-
textOpacity
→ dynamic
-
The opacity at which the text will be drawn.
final
-
textOptional
→ dynamic
-
If true, icons will display without their corresponding text when the
text collides with other symbols and the icon does not.
final
-
textOverlap
→ dynamic
-
Allows for control over whether to show symbol text when it overlaps
other symbols on the map. If
text-overlap is not set,
text-allow-overlap
is used instead
final
-
textPadding
→ dynamic
-
Size of the additional area around the text bounding box used for
detecting symbol collisions.
final
-
textPitchAlignment
→ dynamic
-
Orientation of text when map is pitched.
final
-
Radial offset of text, in the direction of the symbol's anchor. Useful
in combination with
text-variable-anchor,
which defaults to using the two-dimensional
text-offset
if present.
final
-
textRotate
→ dynamic
-
Rotates the text clockwise.
final
-
textRotationAlignment
→ dynamic
-
In combination with
symbol-placement,
determines the rotation behavior of the individual glyphs forming the
text.
final
-
textSize
→ dynamic
-
Font size.
final
-
textTransform
→ dynamic
-
Specifies how to capitalize text, similar to the CSS
text-transform
property.
final
-
textTranslate
→ dynamic
-
Distance that the text's anchor is moved from its original placement.
Positive values indicate right and down, while negative values
indicate left and up.
final
-
textTranslateAnchor
→ dynamic
-
Controls the frame of reference for
text-translate.
final
-
textVariableAnchor
→ dynamic
-
To increase the chance of placing high-priority labels on the map, you
can provide an array of
text-anchor
locations: the renderer will attempt to place the label at each
location, in order, before moving onto the next label. Use
text-justify: auto to choose justification based on anchor position.
To apply an offset, use the
text-radial-offset
or the two-dimensional
text-offset.
final
-
textVariableAnchorOffset
→ dynamic
-
To increase the chance of placing high-priority labels on the map, you
can provide an array of
text-anchor
locations, each paired with an offset value. The renderer will attempt
to place the label at each location, in order, before moving on to the
next location+offset. Use text-justify: auto to choose justification
based on anchor position.
final
-
textWritingMode
→ dynamic
-
The property allows control over a symbol's orientation. Note that the
property values act as a hint, so that a symbol whose language doesn’t
support the provided orientation will be laid out in its natural
orientation. Example: English point symbol will be rendered
horizontally even if array value contains single 'vertical' enum
value. The order of elements in an array define priority order for the
placement of an orientation variant.
final
-
visibility
→ dynamic
-
Whether this layer is displayed.
final