Optional
marginMargin around the label and marker in pixels. This will affect label density. Minimum is 6px.
Optional
markerOptional
backgroundColor?: { active?: string; inactive?: string }Optional
active?: stringBackground color of the marker when it is active. Color can be set using CSS colors names DarkGoldenRod
, as Hex strings #0000FF
or the rgb values rgb(255,0,0)
.
Optional
inactive?: stringBackground color of the marker when it is inactive (grayed out due to being outranked by other labels around). Color can be set using CSS colors names DarkGoldenRod
, as Hex strings #0000FF
or the rgb values rgb(255,0,0)
.
Optional
foregroundColor?: { active?: string; inactive?: string }Optional
active?: stringForeground color of the marker when it is active. Color can be set using CSS colors names DarkGoldenRod
, as Hex strings #0000FF
or the rgb values rgb(255,0,0)
.
Optional
inactive?: stringForeground color of the marker when it is inactive (grayed out due to being outranked by other labels around). Color can be set using CSS colors names DarkGoldenRod
, as Hex strings #0000FF
or the rgb values rgb(255,0,0)
.
Optional
icon?: stringIcon to be placed inside the Floating Label marker. Supports SVG or a URL to png or jpeg.
Optional
iconFit?: "fill" | "contain" | "cover"How the icon should fit inside the marker.
fill
will stretch the icon to fill the marker.cover
will maintain aspect ratio and fill the marker.contain
will maintain aspect ratio and fit the icon inside the marker.Optional
iconOverflow?: "visible" | "hidden"Whether the icon should overflow the circle of the marker.
Optional
iconPadding?: numberPadding between the icon and the marker's border in pixels.
Optional
iconSize?: numberSize of bounding box of the icon
Optional
iconVisibleAtZoomLevel?: numberDefines the zoom level at which the icon becomes visible. Infinity ensures the icon is never visible. -Infinity ensures the icon is always visible.
Optional
textOptional
backgroundColor?: stringText background color. Color can be set using CSS colors names DarkGoldenRod
, as Hex strings #0000FF
or the rgb values rgb(255,0,0)
.
Optional
foregroundColor?: stringText foreground color. Color can be set using CSS colors names DarkGoldenRod
, as Hex strings #0000FF
or the rgb values rgb(255,0,0)
.
Optional
lineHeight?: numberLine height sets the height of a line box. It's commonly used to set the distance between lines of text.
Optional
maxWidth?: numberMaxiumum width of text in pixels.
Optional
numLines?: numberNumber of lines to display when text spans multiple lines.
Optional
size?: numberText size in pixels
Control how a Label looks