Class RoutingOptions

  • java.lang.Object
    • com.here.sdk.routing.RoutingOptions

  • public final class RoutingOptions
    extends java.lang.Object

    The options defines how a route should be calculated.

    The options are used for all transport modes and engines.

    ** Electric vehicle specific requirements ** Electric vehicle consumption are estimated when at least one consumption model is defined. Currently two models are supported:

    • PhysicalConsumptionModel Aside from the values in PhysicalConsumptionModel additionally these values needs to be defined:
    • EmpiricalConsumptionModel

    By setting ElectricVehicleOptions.ensureReachability the RoutingEngine inserts additional charging stations to reach the waypoints. This feature requires setting the BatterySpecifications. By default a vehicle might not reach the waypoint, when the initial charge is not enough to reach all waypoints. See the parameter description below for more details.

    Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.

    • Field Detail

      • transportSpecification

        @NonNull
        public TransportSpecification transportSpecification

        Defines the transport specification which contains the transport mode and the vehicle specifications for the transport mode chosen. By default generic vehicle specifications for the chosen transport mode are used. Notes:

        • The transport mode TransportMode.PUBLIC_TRANSIT is not supported.
        • It is highly recommended to define the truckCategory that is being used, if the transportMode is set to TransportMode.TRUCK.
        • The TransportSpecification.vehicleSpecification.occupancy won't have effect if HOV and/or HOT lane usage is not allowed using EVTruckOptions.allowOptions.
        • The TransportSpecification.pedestrianSpecification.walkSpeedInMetersPerSecond if present, will be used by the service as the walking speed for pedestrian routing. It influences the duration of walking along the route. The provided value must be in the range [0.5, 2.0]. When the value is outside this range, an invalid parameter error is raised. Refer to RoutingError for details. The default speed is 1 meter per second.
      • routeOptions

        @NonNull
        public RouteOptions routeOptions

        Specifies the common route calculation options.

      • textOptions

        @NonNull
        public RouteTextOptions textOptions

        Customize textual content returned from the route calculation, such as localization, format, and unit system.

      • avoidanceOptions

        @NonNull
        public AvoidanceOptions avoidanceOptions

        Options to specify restrictions for route calculations. By default no restrictions are applied.

      • allowOptions

        @NonNull
        public AllowOptions allowOptions

        The options explicitly allowed by user for route calculations. By default no options are opt in.

      • tollOptions

        @NonNull
        public TollOptions tollOptions

        Options to specify how the tolls should be calculated, such as transponders, vehicle category, and emission type. Note Not used for offline calculations.

      • evOptions

        @Nullable
        public ElectricVehicleOptions evOptions

        Defines the electric vehicle (EV) related parameters to calculate the consumption and reachability. When no EV options are defined an internal combustion engine is assumed.

    • Constructor Detail

      • RoutingOptions

        public RoutingOptions()

        Creates a new instance.

    • Method Detail

      • equals

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

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