---
title: lineDash
framework: mapkitjs
role: symbol
role_heading: Instance Property
path: mapkitjs/style/linedash
---

# lineDash

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

## Declaration

```data
get lineDash(): number[];
set lineDash(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, and repeat. If there’s an odd number of elements in the array, MapKit JS copies and duplicates it. Set this to an empty array ([]) to draw solid lines. The default line dash array is [].

## See Also

### Styling lines

- [lineCap](mapkitjs/style/linecap.md)
- [lineDashOffset](mapkitjs/style/linedashoffset.md)
- [lineJoin](mapkitjs/style/linejoin.md)
- [lineWidth](mapkitjs/style/linewidth.md)
- [lineGradient](mapkitjs/style/linegradient.md)
- [LineGradient](mapkitjs/linegradient.md)
