Tension:
0.5
Node size:
15
Original line
Cardinal Spline
Cubic Bezier
Rounded corners
Curved lines
This sample shows three different ways to create curved lines in Azure Maps. Note that there is no curved line class built into Azure Maps and instead you need to calculate points the approximate the path of a curved line. The following three types of line curves are demonstrated in this sample:
Cardinal Spline - A curve calculation built into the Azure Maps math library.
Cubic Bezier - Another type of line curve calculation.
Rounded corners - Where two lines join, a curved is calculated a set offset from the ends of the lines.
Another type of curved line that is not demonstrated in this sample is a great circle line, also known as a geodesic line. This is a line that follows the curvature of the earth and thus only noticable when lines cover a long distance.
Here is an example of a geodesic curve.