Package com.indooratlas.android.sdk
Class IARoute
- java.lang.Object
-
- com.indooratlas.android.sdk.IARoute
-
- All Implemented Interfaces:
Parcelable
public class IARoute extends Object implements Parcelable
Structure representing a route from one location to another. If routing was not successful, route is empty
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIARoute.Errorstatic classIARoute.LegObject representing the line segment between twoIARoute.Points.static classIARoute.Point-
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>CREATOR-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Constructor Description IARoute(Parcel in)IARoute(IARoute.Error error)IARoute(ArrayList<IARoute.Leg> route)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intdescribeContents()static IARoutefrom(Intent intent)Extracts anIARoutefrom the extras of anIntentornullif not present.static IARoutefrom(String json)Create an {#code IARoute} from JSON description Example JSON: { "legs": [ { "begin": { "latitude": ..., "longitude": ..., "floor": ...IARoute.ErrorgetError()List<IARoute.Leg>getLegs()booleanisSuccessful()voidwriteToParcel(Parcel parcel, int flags)
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<IARoute> CREATOR
-
-
Constructor Detail
-
IARoute
public IARoute(ArrayList<IARoute.Leg> route)
-
IARoute
public IARoute(IARoute.Error error)
-
IARoute
public IARoute(Parcel in)
-
-
Method Detail
-
getLegs
public List<IARoute.Leg> getLegs()
-
isSuccessful
public boolean isSuccessful()
-
getError
public IARoute.Error getError()
-
from
public static IARoute from(Intent intent)
Extracts anIARoutefrom the extras of anIntentornullif not present. Use this utility method for received Intents after requesting location updates withIALocationManager.requestWayfindingUpdates(com.indooratlas.android.sdk.resources.IALatLngFloorCompatible, com.indooratlas.android.sdk.IAWayfindingListener, android.os.Looper). The event is stored in the extraBundleabyte arraywith theIALocationManager.EXTRA_WAYFINDING_EVENTkey.- Parameters:
intent-Intentto extract theIARoutefrom. Can be null.- Returns:
- an
IARouteornull
-
from
public static IARoute from(String json)
Create an {#code IARoute} from JSON description Example JSON: { "legs": [ { "begin": { "latitude": ..., "longitude": ..., "floor": ... }, "end": { "latitude": ..., "longitude": ..., "floor": ... }, "length": ... "direction": ... }, ... ] } If invalid JSON is given the error bit on the returned route will be set and isSuccessful returns false.
-
describeContents
public int describeContents()
- Specified by:
describeContentsin interfaceParcelable
-
writeToParcel
public void writeToParcel(Parcel parcel, int flags)
- Specified by:
writeToParcelin interfaceParcelable
-
-