Skip to content

Commit c3537d6

Browse files
authored
Document properties set by NearestPointOnLine on returned Point (#155)
1 parent bbccfb3 commit c3537d6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/src/nearest_point_on_line.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,13 @@ _NearestMulti? _nearestPointOnMultiLine(
183183
}
184184

185185
/// Takes a [Point] and a [LineString] and calculates the closest Point on the [LineString].
186+
///
187+
/// The properties of returned [Point] will contain three values:
188+
/// * index: closest point was found on nth line part
189+
/// * dist: distance between [point] and the closest point on line
190+
/// * location: distance along the line between start and the closest point.
191+
///
192+
/// Example:
186193
/// ```dart
187194
/// var line = LineString(
188195
/// coordinates: [

0 commit comments

Comments
 (0)