Package com.indooratlas.android.sdk
Class IARoute.Leg
- java.lang.Object
-
- com.indooratlas.android.sdk.IARoute.Leg
-
- All Implemented Interfaces:
Parcelable
- Enclosing class:
- IARoute
public static class IARoute.Leg extends Object implements Parcelable
Object representing the line segment between twoIARoute.Points
. Includes the distance and direction of the segment as well as the start and end points.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static Parcelable.Creator<IARoute.Leg>
CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Constructor Description Leg(Parcel in)
Leg(IARoute.Point begin, IARoute.Point end, double length, double direction, Integer index)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
describeContents()
IARoute.Point
getBegin()
Get theIARoute.Point
representing the beginning of this leg.double
getDirection()
Get the direction of the line segment in ENU coordinates in degrees.Integer
getEdgeIndex()
Get the zero-based index of the edge corresponding to this leg in the original JSON graph.IARoute.Point
getEnd()
Get theIARoute.Point
representing the end of this leg.double
getLength()
Get the length of the line segment in meters.void
writeToParcel(Parcel parcel, int flags)
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<IARoute.Leg> CREATOR
-
-
Constructor Detail
-
Leg
public Leg(IARoute.Point begin, IARoute.Point end, double length, double direction, Integer index)
Constructor
-
Leg
public Leg(Parcel in)
-
-
Method Detail
-
getLength
public double getLength()
Get the length of the line segment in meters.
-
getDirection
public double getDirection()
Get the direction of the line segment in ENU coordinates in degrees. 0 is North and 90 is East.
-
getBegin
public IARoute.Point getBegin()
Get theIARoute.Point
representing the beginning of this leg.
-
getEnd
public IARoute.Point getEnd()
Get theIARoute.Point
representing the end of this leg.
-
getEdgeIndex
public Integer getEdgeIndex()
Get the zero-based index of the edge corresponding to this leg in the original JSON graph. If this is a virtual leg, for example, a segment connecting an off-graph starting point to the graph, returns null.
-
describeContents
public int describeContents()
- Specified by:
describeContents
in interfaceParcelable
-
writeToParcel
public void writeToParcel(Parcel parcel, int flags)
- Specified by:
writeToParcel
in interfaceParcelable
-
-