Class RouteLeg
java.lang.Object
com.codename1.maps.routing.RouteLeg
The portion of a
Route between two consecutive stops. A direct journey
has a single leg; each RouteRequest.addWaypoint(LatLng) adds another.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleThe length of this leg in meters.doubleThe estimated travel time for this leg in seconds.getSteps()The unmodifiable list ofRouteSteps making up this leg.A short description of the leg, typically the major roads it uses.toString()Returns a string representation of the object.
-
Constructor Details
-
RouteLeg
Creates a leg. Called by
RouteServiceimplementations.Parameters
-
summary: a short description such as the major roads used -
distanceMeters: the length of the leg in meters -
durationSeconds: the estimated travel time in seconds -
steps: theRouteSteps of this leg, defensively copied
-
-
-
Method Details
-
getSummary
A short description of the leg, typically the major roads it uses. -
getDistanceMeters
public double getDistanceMeters()The length of this leg in meters. -
getDurationSeconds
public double getDurationSeconds()The estimated travel time for this leg in seconds. -
getSteps
The unmodifiable list ofRouteSteps making up this leg. Empty when the request hadRouteRequest.setSteps(boolean)turned off. -
toString
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method. The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of: getClass().getName() + '@' + Integer.toHexString(hashCode())
-