Interface: PolylineConfig
Configuration of a line drawn through a list of positions — a path, a walked trajectory, the link between an estimate and its ground truth.
Example
map.addPolyline({
coordinates: [
{ lat: -33.4177, lng: -70.6066 },
{ lat: -33.4181, lng: -70.6061 },
],
floorId: "level-1",
color: "#f0883e",
dashed: true,
})Extends
Properties
allFloors?
optional allFloors?: boolean;Show the shape on every floor and outdoors, instead of following the floorId rule.
Default Value
falseInherited from
color?
optional color?: string;Line color in any valid CSS color format.
Default Value
coordinates
coordinates: LatLng[];The positions the line goes through, in order. At least two.
Throws
Error if there are fewer than two positions or any is out of bounds.
dashed?
optional dashed?: boolean;Draw the line dashed instead of solid.
Default Value
falsefloorId?
optional floorId?: string;Identifier for the floor the shape is drawn on. A shape with a floor is shown only while that floor is displayed; a shape without one is shown while no floor is displayed, and in outdoor contexts. Markers, circles and shapes all answer this through one predicate, so the rule is literally the same for all three.
Inherited from
id?
optional id?: string;Unique identifier for the shape. If not provided, a hexadecimal key will be generated automatically. Polylines and polygons share one id space.
Inherited from
opacity?
optional opacity?: number;Line opacity, between 0 and 1. Values outside this range are clamped.
Default Value
1renderOrder?
optional renderOrder?: CircleRenderOrder;Where the shape renders relative to other map layers.
See
ShapeRenderOrder for the available placements.
Default Value
"aboveBasemap"Inherited from
width?
optional width?: number;Line width in pixels.
Default Value
3