From c3537d6878dda2cab47f1fd420434c1d222b2aff Mon Sep 17 00:00:00 2001 From: L Linse Date: Thu, 25 Jan 2024 10:54:21 +0100 Subject: [PATCH] Document properties set by NearestPointOnLine on returned Point (#155) --- lib/src/nearest_point_on_line.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/src/nearest_point_on_line.dart b/lib/src/nearest_point_on_line.dart index 1255407..4656bef 100644 --- a/lib/src/nearest_point_on_line.dart +++ b/lib/src/nearest_point_on_line.dart @@ -183,6 +183,13 @@ _NearestMulti? _nearestPointOnMultiLine( } /// Takes a [Point] and a [LineString] and calculates the closest Point on the [LineString]. +/// +/// The properties of returned [Point] will contain three values: +/// * index: closest point was found on nth line part +/// * dist: distance between [point] and the closest point on line +/// * location: distance along the line between start and the closest point. +/// +/// Example: /// ```dart /// var line = LineString( /// coordinates: [