Skip to content

Path

An abstract class that contains options and constants shared between vector overlays (Polygon, Polyline, Circle). Do not use it directly. Extends Layer.

Options

OptionTypeDefaultDescription
strokeBooleantrueWhether to draw stroke along the path. Set it to false to disable borders on polygons or circles.
colorString'#3388ff'Stroke color
weightNumber3Stroke width in pixels
opacityNumber1.0Stroke opacity
lineCapString'round'A string that defines shape to be used at the end of the stroke.
lineJoinString'round'A string that defines shape to be used at the corners of the stroke.
dashArrayStringnullA string that defines the stroke dash pattern.
dashOffsetStringnullA string that defines the distance into the dash pattern to start the dash.
fillBooleandependsWhether to fill the path with color. Set it to false to disable filling on polygons or circles.
fillColorString*Fill color. Defaults to the value of the color option
fillOpacityNumber0.2Fill opacity.
fillRuleString'evenodd'A string that defines how the inside of a shape is determined.
bubblingPointerEventsBooleantrueWhen true, a pointer event on this path will trigger the same event on the map