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 class
IARoute.Error
static class
IARoute.Leg
Object representing the line segment between twoIARoute.Points
.static class
IARoute.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 int
describeContents()
static IARoute
from(Intent intent)
Extracts anIARoute
from the extras of anIntent
ornull
if not present.static IARoute
from(String json)
Create an {#code IARoute} from JSON description Example JSON: { "legs": [ { "begin": { "latitude": ..., "longitude": ..., "floor": ...IARoute.Error
getError()
List<IARoute.Leg>
getLegs()
boolean
isSuccessful()
void
writeToParcel(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 anIARoute
from the extras of anIntent
ornull
if 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 extraBundle
abyte array
with theIALocationManager.EXTRA_WAYFINDING_EVENT
key.- Parameters:
intent
-Intent
to extract theIARoute
from. Can be null.- Returns:
- an
IARoute
ornull
-
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:
describeContents
in interfaceParcelable
-
writeToParcel
public void writeToParcel(Parcel parcel, int flags)
- Specified by:
writeToParcel
in interfaceParcelable
-
-