<!--
{
  "availability" : [
    "MapKit JS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKitJS",
  "identifier" : "/documentation/MapKitJS/StyleConstructorOptions",
  "metadataVersion" : "0.1.0",
  "role" : "Interface",
  "symbol" : {
    "kind" : "Interface",
    "modules" : [
      "MapKit JS"
    ],
    "preciseIdentifier" : "struct/mapkit.StyleConstructorOptions"
  },
  "title" : "StyleConstructorOptions"
}
-->

# StyleConstructorOptions

Initial values of options for applying style to overlays.

```
interface StyleConstructorOptions
```

## Topics

### Setting fill styles

[`fillColor?: string;`](/documentation/MapKitJS/StyleConstructorOptions/fillColor)

The fill color of a shape.

[`fillOpacity?: number;`](/documentation/MapKitJS/StyleConstructorOptions/fillOpacity)

The opacity of the fill color.

[`fillRule?: "evenodd" | "nonzero";`](/documentation/MapKitJS/StyleConstructorOptions/fillRule)

A rule for determining whether a point is inside or outside a polygon.

### Setting line styles

[`lineCap?: "butt" | "round" | "square";`](/documentation/MapKitJS/StyleConstructorOptions/lineCap)

The style to use when drawing line endings.

[`lineDash?: number[];`](/documentation/MapKitJS/StyleConstructorOptions/lineDash)

An array of line and gap lengths for creating a dashed line.

[`lineDashOffset?: number;`](/documentation/MapKitJS/StyleConstructorOptions/lineDashOffset)

The number of CSS pixels to use as the offset when drawing a line’s dash pattern.

[`lineJoin?: "bevel" | "miter" | "round";`](/documentation/MapKitJS/StyleConstructorOptions/lineJoin)

The style to use when drawing joins between line segments.

[`lineWidth?: number;`](/documentation/MapKitJS/StyleConstructorOptions/lineWidth)

The width of a line’s stroke, in CSS pixels.

### Setting stroke styles

[`strokeColor?: string;`](/documentation/MapKitJS/StyleConstructorOptions/strokeColor)

The stroke color of a line.

[`strokeOpacity?: number;`](/documentation/MapKitJS/StyleConstructorOptions/strokeOpacity)

The opacity of the stroke color.

[`strokeStart?: number;`](/documentation/MapKitJS/StyleConstructorOptions/strokeStart)

The unit distance along the line where a stroke begins.

[`strokeEnd?: number;`](/documentation/MapKitJS/StyleConstructorOptions/strokeEnd)

The unit distance along the line where a stroke ends.

[`lineGradient?: LineGradient;`](/documentation/MapKitJS/StyleConstructorOptions/lineGradient)

The gradient to apply along the line.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)