Search results

Navigation Lines

Navigation lines are used to denote the path between the two locations. We can use this feature as flight or train or sea routes.

Following example shows rendering the path between two locations using latitudes and longitudes.

Yon can customize the navigation line color, dashArray, width and angle by modifying their default values in navigationLineSettings.

Refer the below code snippet to navigate line between two cities in World map. Import usmap geo json data from world_map.ts file. Import the NavigationLine Module and Inject into the Maps using Maps.Inject(NavigationLine). Provide two locations latitude and longitude values to navigationLineSettings.

<!DOCTYPE html><html lang="en"><head>
    <title>EJ2 Maps</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Typescript UI Controls">
    <meta name="author" content="Syncfusion">
    <link href="index.css" rel="stylesheet">
<script src="//" type="text/javascript"></script>

    <div id="container" style="height: 500px; width: 500px">
        <div id="element"></div>

var ele = document.getElementById('container');
if(ele) { = "visible";
<script src="index.js" type="text/javascript"></script>

Refer the API for Navigation Lines feature.