Class NavigationProgress

  • All Implemented Interfaces:
    android.os.Parcelable, MapperInterface

    public class NavigationProgress
    extends java.lang.Object
    implements android.os.Parcelable, MapperInterface
    Provide information of the progress of a user while following a route.
    • Field Detail

    • Method Detail

      • getDistanceToGoal

        @FloatRange(from=0.0)
        public double getDistanceToGoal()
        Returns the distance from getClosestLocationInRoute() to route's goal point.
        Returns:
        double. Default is 0.
      • getCurrentIndication

        @NonNull
        public Indication getCurrentIndication()
        Returns the current indication
      • getNextIndication

        @NonNull
        public Indication getNextIndication()
        Returns the next indication. If this is the last indication it will return Indication.EMPTY
      • getDistanceToEndStep

        @FloatRange(from=0.0)
        public double getDistanceToEndStep()
        Returns the distance to the end this step
      • getTimeToGoal

        @FloatRange(from=0.0)
        public double getTimeToGoal()
        Returns the estimated time to go from getClosestLocationInRoute() to the goal/end of route, considering a speed of 1 meter/second
        Returns:
        double. Default is 0.
      • getTimeToEndStep

        @FloatRange(from=0.0)
        public double getTimeToEndStep()
        Returns the estimated time to go from getClosestLocationInRoute() to the end of getRouteStep(), considering a speed of 1 meter/second
        Returns:
        double. Default is 0.
      • getPoints

        @NonNull
        public java.util.List<Point> getPoints()
        Returns remaining list of ordered points of the route. If you want the points to display them in a map use getSegments()
        Returns:
        non-empty list of points
      • getSegments

        @NonNull
        public java.util.List<RouteSegment> getSegments()
        Return list of ordered points split by floor, each list contains points from one floor, but can have multiple lists of the same floor. Use this method to display segments in a map, each list should be a polyline.

        For example, if there is no path to go to the other side of the same floor and you need to go up one floor and then go down again to the original floor, this method will return one segment on the current floor, one segment on the upper floor and one more segment in the current floor.

        Drawing example: if you want to draw all the points of a floor, you should draw a polyline for each list that contains the floor you want to show.

      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toMap

        public java.util.Map<java.lang.String,​java.lang.Object> toMap()
        Description copied from interface: MapperInterface
        Method to transform object into Map
        Specified by:
        toMap in interface MapperInterface
        Returns:
        Map with the information of the object mapped
      • describeContents

        public int describeContents()
        Specified by:
        describeContents in interface android.os.Parcelable
      • writeToParcel

        public void writeToParcel​(android.os.Parcel dest,
                                  int flags)
        Specified by:
        writeToParcel in interface android.os.Parcelable