Segment

class Segment(val start: RouteCoordinate, val end: RouteCoordinate)

Represents a line between two RouteCoordinate.

Important: This is a Public Preview API. It may be changed or removed at any time.

Parameters

start

The starting coordinate of the line segment.

end

The end coordinate of the line segment.

Constructors

Link copied to clipboard
fun Segment(start: RouteCoordinate, end: RouteCoordinate)

Functions

Link copied to clipboard
fun intermediatePoint(distanceAlongSegment: Distance): GeoCoordinate

Calculates intermediate point of segment.

Properties

Link copied to clipboard
val end: RouteCoordinate
Link copied to clipboard
val length: Distance

The length of this segment.

Link copied to clipboard
val routeOffset: Distance

The offset of this segment from the start of the route.

Link copied to clipboard
val start: RouteCoordinate