require(["esri/geometry/mathUtils"], function(mathUtils) { /* code goes here */ });
Description
(Added at v3.8)
Utility methods for getting length of a line segment or intersection of two segments.
When coding legacy (non-AMD) style, there is no need to require the module. All methods and properties are available in the namespace. For example,
esri.geometry.getLength()
.
Samples
Search for
samples that use this class.
Methods
Method Details
Calculates the length of a line based on the input of two points.
Parameters:
<Point > point1 |
Required |
The beginning point. |
<Point > point2 |
Required |
The ending point. |
Calculates the intersecting point of two lines. If the lines are parallel, a null value is returned.
Parameters:
<Point > line1start |
Required |
The beginning point of the first line. |
<Point > line1end |
Required |
The ending point of the first line. |
<Point > line2start |
Required |
The beginning point of the second line. |
<Point > line2end |
Required |
The ending point of the second line. |