Class RouteAdjustment.Builder

  • Enclosing class:
    RouteAdjustment

    public static final class RouteAdjustment.Builder
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • useRouteAdjustment

        @NonNull
        public RouteAdjustment.Builder useRouteAdjustment​(java.lang.Boolean useRouteAdjustment)
        (EXPERIMENTAL) Boolean that determines whether the location should be adjusted to the route in both coordinates and bearing. This adjust will only take place when the conditions defined by RouteAdjustment.distanceThreshold and RouteAdjustment.angleDifferenceThreshold are fulfilled.

        In order to return the location projected in the route this boolean must be set to true, the distance from the estimated coordinates to the route should be below RouteAdjustment.distanceThreshold and the angle difference from the current bearing to that of the route should be below RouteAdjustment.angleDifferenceThreshold

        Parameters:
        useRouteAdjustment - boolean. Default value is false (do not adjust Location to route).
      • distanceThreshold

        @NonNull
        public RouteAdjustment.Builder distanceThreshold​(java.lang.Float distanceThreshold)
        (EXPERIMENTAL) Float that defines the distance threshold measured in meters from the current location to the route.

        It is a required condition for projecting the location on the route that the distance between the estimated location and its projection on the route is below this value.

        Parameters:
        distanceThreshold - Float.
      • angleDifferenceThreshold

        @NonNull
        public RouteAdjustment.Builder angleDifferenceThreshold​(java.lang.Float angleDifferenceThreshold)
        (EXPERIMENTAL) Float that defines the angle difference threshold measured in radians between the current location's orientation and the orientation of its projection onto the route.

        It is a required condition for projecting the location on the route that the angle difference between the estimated location bearing and its projection on the route is below this value.

        Parameters:
        angleDifferenceThreshold - Float.