getDistanceOnRoute method
Returns the route distance (meters) from departure at the given coords.
Measures the distance along the route from the departure point to the point closest to coords.
Parameters
coords: The geographic coordinates where the distance should be measured.activePart: Iftrue, consider only the active portion of the route; otherwise consider the whole route.
Returns
- An
intrepresenting the distance in meters from route start to the point closest tocoords. Returns GemError.general.code (-1) on error.
Implementation
int getDistanceOnRoute(final Coordinates coords, final bool activePart) {
final OperationResult resultString = objectMethod(
pointerId,
'RouteBase',
'getDistanceOnRoute',
args: <String, Object>{'coords': coords, 'activePart': activePart},
);
return resultString['result'];
}