# Link Map Markers to Locations

## Environment

<table>
    <tbody>
	    <tr>
	    	<td>Product Version</td>
	    	<td>5.5.1</td>
	    </tr>
	    <tr>
	    	<td>Product</td>
	    	<td>Progress® KendoReact Map</td>
	    </tr>
    </tbody>
</table>

## Description

How can I draw a straight line between a marker and a location?

## Solution

1. Add [shape and marker layers](https://www.telerik.com/kendo-react-ui/components/map/layers) to the Map configuration.
2. Attach a handler to the [reset event](https://www.telerik.com/kendo-react-ui/components/map/events) of the Map.
3. Create a method that will draw a line between a marker and a specified position.
4. Inside the method, retrieve the from and to coordinates for the line by using the [locationToView method](https://www.telerik.com/kendo-react-ui/components/map/api/maphandle#locationtoview).
5. Get a reference to the shape layer so you can draw on its surface.
6. Draw the line by using the [Path element](https://www.telerik.com/kendo-react-ui/components/drawing/api/path).

The following example demonstrates how to draw a straight line between a marker and a location.

[Demo Source](https://demos.telerik.com/kendo-react-ui/knowledge-base/map/link-markers/source.txt)
