The navigation lines are used to denote path between two locations. You can use this feature to draw the flight, train, and sea routes.
You can customize the following properties in the navigation lines by modifying their default values in MapsNavigationLine
:
Refer to following code snippet to navigate line between two cities in the world map along with customization.
@using Syncfusion.EJ2.Blazor.Maps
<EjsMaps>
<MapsLayers>
<MapsLayer ShapeData='new {dataOptions ="https://cdn.syncfusion.com/maps/map-data/world-map.json"}'>
<MapsNavigationLines>
<MapsNavigationLine Visible="true"
Color="blue"
Angle="90"
Width="2"
DashArray="4"
Latitude="new double[]{ 40.7128, 36.7783 }"
Longitude="new double[]{ -74.0060, -119.4179 }">
</MapsNavigationLine>
</MapsNavigationLines>
</MapsLayer>
</MapsLayers>
</EjsMaps>
You can enable arrows in the navigation lines using the ShowArrow
property in MapsArrow
tag. You can also customize the following properties in arrow:
Start
or End
of line.@using Syncfusion.EJ2.Blazor.Maps
<EjsMaps>
<MapsLayers>
<MapsLayer ShapeData='new {dataOptions ="https://cdn.syncfusion.com/maps/map-data/world-map.json"}'>
<MapsNavigationLines>
<MapsNavigationLine Visible="true"
Color="blue"
Angle="90"
Width="2"
DashArray="4"
Latitude="new double[]{ 40.7128, 36.7783 }"
Longitude="new double[]{ -74.0060, -119.4179 }">
@* To set arrow for navigation line *@
<MapsArrow ShowArrow="true" Color="blue"></MapsArrow>
</MapsNavigationLine>
</MapsNavigationLines>
</MapsLayer>
</MapsLayers>
</EjsMaps>