public class

RoutingResult

extends Object
java.lang.Object
   ↳ com.carto.routing.RoutingResult

Class Overview

A class that defines list of routing actions and path geometry.

Summary

Public Constructors
RoutingResult(Projection projection, MapPosVector points, RoutingInstructionVector instructions)
Constructs a new RoutingResult instance from projection, points and instructions.
Public Methods
synchronized void delete()
boolean equals(Object obj)
Checks if this object is equal to the specified object.
RoutingInstructionVector getInstructions()
Returns the turn-by-turn instruction list.
MapPosVector getPoints()
Returns the point list of the result.
Projection getProjection()
Returns the projection of the points in the result.
double getTotalDistance()
Returns the total distance of the path.
double getTotalTime()
Returns the approximate total duration of the path.
int hashCode()
Returns the hash value of this object.
String toString()
Creates a string representation of this result object, useful for logging.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public RoutingResult (Projection projection, MapPosVector points, RoutingInstructionVector instructions)

Constructs a new RoutingResult instance from projection, points and instructions.

Parameters
projection The projection of the routing result (same as the request).
points The point list defining the routing path. Instructions refer to this list.
instructions The turn-by-turn instruction list.

Public Methods

public synchronized void delete ()

public boolean equals (Object obj)

Checks if this object is equal to the specified object.

Parameters
obj The reference object.
Returns
  • True when objects are equal, false otherwise.

public RoutingInstructionVector getInstructions ()

Returns the turn-by-turn instruction list.

Returns
  • The turn-by-turn instruction list.

public MapPosVector getPoints ()

Returns the point list of the result. The list contains all the points the route must pass in correct order.

Returns
  • The point list of the path.

public Projection getProjection ()

Returns the projection of the points in the result.

Returns
  • The projection of the result.

public double getTotalDistance ()

Returns the total distance of the path.

Returns
  • The total distance in meters.

public double getTotalTime ()

Returns the approximate total duration of the path.

Returns
  • The total duration in seconds.

public int hashCode ()

Returns the hash value of this object.

Returns
  • The hash value of this object.

public String toString ()

Creates a string representation of this result object, useful for logging.

Returns
  • The string representation of this result object.