---
title: polyline
framework: mapkitjs
role: symbol
role_heading: Instance Property
path: mapkitjs/route/polyline
---

# polyline

An instance of a polyline overlay that represents the path of a route.

## Declaration

```data
get polyline(): PolylineOverlay;
```

## Mentioned in

MapKit JS 5

## Discussion

Discussion You can add the value of the polyline property directly to the map. const route = directions.route({     origin: new mapkit.Coordinate(37.616934, -122.383790),     destination: new mapkit.Coordinate(37.3349, -122.0090201) }, function(error, data) {

const polylines = data.routes.map(function(route) {         return route.polyline;     });

map.showItems(polylines);

});
