Class RouteCalculationOptions

java.lang.Object
com.navmii.sdk.routecalculation.RouteCalculationOptions

public abstract class RouteCalculationOptions
extends java.lang.Object
  • Constructor Details

  • Method Details

    • getIsWalkingMode

      public abstract boolean getIsWalkingMode()
      Specifies whether walking mode is used. Default value is 'false'.
    • setIsWalkingMode

      public abstract void setIsWalkingMode​(boolean isWalkingMode)
      Specifies whether walking mode is used.
    • getOptimization

      public abstract RoutingOptimization getOptimization()
      Specifies route optimization. The property is ignored in walking mode. Default value is RoutingOptimization_Fastest.
    • setOptimization

      public abstract void setOptimization​(RoutingOptimization routingOptimization)
      Specifies route optimization. The property is ignored in walking mode.
    • getVehicleType

      public abstract VehicleType getVehicleType()
      Specifies vehicle type. The property is ignored in walking mode. Default value is VehicleType_Car.
    • setVehicleType

      public abstract void setVehicleType​(VehicleType vehicleType)
      Specifies vehicle type. The property is ignored in walking mode.
    • getAvoidTollRoads

      public abstract boolean getAvoidTollRoads()
      Specifies whether toll roads should be avoided. The property is ignored in walking mode. Default value is 'false'.
    • setAvoidTollRoads

      public abstract void setAvoidTollRoads​(boolean avoidTollRoads)
      Specifies whether toll roads should be avoided. The property is ignored in walking mode.
    • getConsiderTraffic

      public abstract boolean getConsiderTraffic()
      Specifies whether traffic should be considered during route calculation. The property is ignored in walking mode. Default value is 'true'.
    • setConsiderTraffic

      public abstract void setConsiderTraffic​(boolean considerTraffic)
      Specifies whether traffic should be considered during route calculation. The property is ignored in walking mode.
    • getUseServerTimesToCalculateEta

      public abstract boolean getUseServerTimesToCalculateEta()
      Specifies whether using times from routing server (if available) is enabled to calculate ETA. If set to 'false' times from map data is used to calculate ETA.
    • setUseServerTimesToCalculateEta

      public abstract void setUseServerTimesToCalculateEta​(boolean useServerTimesToCalculateEta)
      Specifies whether using times from routing server (if available) is enabled to calculate ETA. If set to 'false' times from map data is used to calculate ETA. Default value is 'true'.
    • getMaxAlternativeRouteCount

      public abstract short getMaxAlternativeRouteCount()
      Limits maximum number of alternative routes being calculated in route calculation session.
    • setMaxAlternativeRouteCount

      public abstract void setMaxAlternativeRouteCount​(short maxAlternativeRouteCount)
      Limits maximum number of alternative routes being calculated in route calculation session. Default value is 3.
    • getComputeEstimatedTimeIgnoringTrafficDelay

      public abstract boolean getComputeEstimatedTimeIgnoringTrafficDelay()
      Informs routing engine that it should compute the estimated route time not considering delays caused by traffic along with just estimated route time. The computed value is available via the Route.getEstimatedTimeIgnoringTrafficDelay method of Route class. Default value is 'false'.
    • setComputeEstimatedTimeIgnoringTrafficDelay

      public abstract void setComputeEstimatedTimeIgnoringTrafficDelay​(boolean computeEstimatedTimeIgnoringTrafficDelay)
      Informs routing engine that it should compute the estimated route time not considering delays caused by traffic along with just estimated route time. The computed value is available via the Route.getEstimatedTimeIgnoringTrafficDelay method of Route class.
    • getRoutingType

      public abstract RoutingType getRoutingType()
      Specifies routing type. RoutingType_AlwaysOnline value forces the SDK to always use server routing. RoutingType_Combined value indicates that either onboard or server routing is used depending on the maxOnboardRoutingDistanceInMeters property value. Default value is RoutingType_Combined.
    • setRoutingType

      public abstract void setRoutingType​(RoutingType routingType)
      Specifies routing type. RoutingType_AlwaysOnline value forces the SDK to always use server routing. RoutingType_Combined value indicates that either onboard or server routing is used depending on the maxOnboardRoutingDistanceInMeters property value.
    • getMaxOnboardRoutingDistanceInMeters

      public abstract int getMaxOnboardRoutingDistanceInMeters()
      Specifies whether onboard or server routing will be used if onboard routing is enabled. If maximal distance in meters between each waypoint pair is larger than the specified value, server routing is used. Otherwise onboard routing is used. Property is ignored if using server routing is forced by setting the #routingType property to RoutingType_AlwaysOnline. If using onboard routing is enabled and value of this property is set to -1, server routing is never used. Default value is 30,000 meters.
    • setMaxOnboardRoutingDistanceInMeters

      public abstract void setMaxOnboardRoutingDistanceInMeters​(int maxOnboardRoutingDistanceInMeters)
      Specifies whether onboard or server routing will be used if onboard routing is enabled. If maximal distance in meters between each waypoint pair is larger than the specified value, server routing is used. Otherwise onboard routing is used. Property is ignored if using server routing is forced by setting the routingType property to RoutingType_AlwaysOnline. If using onboard routing is enabled and value of this property is set to -1, server routing is never used.
    • getMaxSnappingDistanceForServerRouteInMeters

      public abstract int getMaxSnappingDistanceForServerRouteInMeters()
      Limits the distance of the route being snapped to map immediately after obtaining the route. Setting this property to -1 indicates that snapping distance is unlimited and the whole route will be snapped immediately after obtaining the route. Please note that setting large values or -1 to the property may slow down the whole calculation process, because the snapping process requires all the map tiles along the snapping route part being downloaded from web. This property is taken into account in case of server routing only. Default value is 100,000 meters.
    • setMaxSnappingDistanceForServerRouteInMeters

      public abstract void setMaxSnappingDistanceForServerRouteInMeters​(int maxSnappingDistanceForServerRouteInMeters)
      Limits the distance of the route being snapped to map immediately after obtaining the route. Setting this property to -1 indicates that snapping distance is unlimited and the whole route will be snapped immediately after obtaining the route. Please note that setting large values or -1 to the property may slow down the whole calculation process, because the snapping process requires all the map tiles along the snapping route part being downloaded from web. This property is taken into account in case of server routing only.
    • getTrafficSnapshot

      public abstract TrafficSnapshot getTrafficSnapshot()
      A traffic snapshot which is used in route calculation and visualisation of the route polyline. The source of the traffic snapshot is another SDK module. If you want to consider traffic in route calculation and display it on the route polyline after the route is calculated you need to set valid nonnull value to this property. Default value is 'null'.
    • setTrafficSnapshot

      public abstract void setTrafficSnapshot​(TrafficSnapshot trafficSnapshot)
      A traffic snapshot which is used in route calculation and visualisation of the route polyline. The source of the traffic snapshot is another SDK module. If you want to consider traffic in route calculation and display it on the route polyline after the route is calculated you need to set valid nonnull value to this property.
    • getExternalRouteProvider

      public abstract ExternalRouteProvider getExternalRouteProvider()
      Route provider to be used to fetch routes from external routing server. If not specified default server is used. Default value is 'null'.
    • setExternalRouteProvider

      public abstract void setExternalRouteProvider​(ExternalRouteProvider externalRouteProvider)
      Route provider to be used to fetch routes from external routing server. If not specified default server is used. Methods of ExternalRouteProvider are called not in the main (UI) thread. Default value is 'null'.
    • create

      public static RouteCalculationOptions create()
      Creates RouteCalculationOptions with default values.
    • createInWalkingMode

      public static RouteCalculationOptions createInWalkingMode()
      Creates RouteCalculationOptions with default values except the isWalkingMode property, which is initialized with 'true'.
    • createWithTraffic

      public static RouteCalculationOptions createWithTraffic​(TrafficSnapshot trafficSnapshot)
      Creates RouteCalculationOptions with default values except the trafficSnapshot property, which is initialized with the specified traffic snapshot.
      Parameters:
      trafficSnapshot - Traffic snapshot to initialize RouteCalculationOptions with.