---
title: lineDash
framework: mapkitjs
role: symbol
role_heading: Interface Property
path: mapkitjs/styleconstructoroptions/linedash
---

# lineDash

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

## Declaration

```data
lineDash?: number[];
```

## Discussion

Discussion This property provides an array to use as the line’s dash pattern where the numbers represent line and gap lengths in CSS pixels. For example, [10, 5] means draw for 10 pixels, leave a 5-pixel gap, then repeat. If there’s an odd number of elements in the array, MapKit JS copies and duplicates it. Set to an empty array ([]), to draw solid lines. The default line dash array is [].

## See Also

### Setting line styles

- [lineCap](mapkitjs/styleconstructoroptions/linecap.md)
- [lineDashOffset](mapkitjs/styleconstructoroptions/linedashoffset.md)
- [lineJoin](mapkitjs/styleconstructoroptions/linejoin.md)
- [lineWidth](mapkitjs/styleconstructoroptions/linewidth.md)
