Package com.navmii.sdk.routecalculation
Class RouteCalculationOptions
java.lang.Object
com.navmii.sdk.routecalculation.RouteCalculationOptions
public abstract class RouteCalculationOptions
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description RouteCalculationOptions()
-
Method Summary
Modifier and Type Method Description static RouteCalculationOptions
create()
Creates RouteCalculationOptions with default values.static RouteCalculationOptions
createInWalkingMode()
Creates RouteCalculationOptions with default values except the isWalkingMode property, which is initialized with 'true'.static RouteCalculationOptions
createWithTraffic(TrafficSnapshot trafficSnapshot)
Creates RouteCalculationOptions with default values except the trafficSnapshot property, which is initialized with the specified traffic snapshot.abstract boolean
getAvoidTollRoads()
Specifies whether toll roads should be avoided.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.abstract boolean
getConsiderTraffic()
Specifies whether traffic should be considered during route calculation.abstract ExternalRouteProvider
getExternalRouteProvider()
Route provider to be used to fetch routes from external routing server.abstract boolean
getIsWalkingMode()
Specifies whether walking mode is used.abstract short
getMaxAlternativeRouteCount()
Limits maximum number of alternative routes being calculated in route calculation session.abstract int
getMaxOnboardRoutingDistanceInMeters()
Specifies whether onboard or server routing will be used if onboard routing is enabled.abstract int
getMaxSnappingDistanceForServerRouteInMeters()
Limits the distance of the route being snapped to map immediately after obtaining the route.abstract RoutingOptimization
getOptimization()
Specifies route optimization.abstract RoutingType
getRoutingType()
Specifies routing type.abstract TrafficSnapshot
getTrafficSnapshot()
A traffic snapshot which is used in route calculation and visualisation of the route polyline.abstract boolean
getUseServerTimesToCalculateEta()
Specifies whether using times from routing server (if available) is enabled to calculate ETA.abstract VehicleType
getVehicleType()
Specifies vehicle type.abstract void
setAvoidTollRoads(boolean avoidTollRoads)
Specifies whether toll roads should be avoided.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.abstract void
setConsiderTraffic(boolean considerTraffic)
Specifies whether traffic should be considered during route calculation.abstract void
setExternalRouteProvider(ExternalRouteProvider externalRouteProvider)
Route provider to be used to fetch routes from external routing server.abstract void
setIsWalkingMode(boolean isWalkingMode)
Specifies whether walking mode is used.abstract void
setMaxAlternativeRouteCount(short maxAlternativeRouteCount)
Limits maximum number of alternative routes being calculated in route calculation session.abstract void
setMaxOnboardRoutingDistanceInMeters(int maxOnboardRoutingDistanceInMeters)
Specifies whether onboard or server routing will be used if onboard routing is enabled.abstract void
setMaxSnappingDistanceForServerRouteInMeters(int maxSnappingDistanceForServerRouteInMeters)
Limits the distance of the route being snapped to map immediately after obtaining the route.abstract void
setOptimization(RoutingOptimization routingOptimization)
Specifies route optimization.abstract void
setRoutingType(RoutingType routingType)
Specifies routing type.abstract void
setTrafficSnapshot(TrafficSnapshot trafficSnapshot)
A traffic snapshot which is used in route calculation and visualisation of the route polyline.abstract void
setUseServerTimesToCalculateEta(boolean useServerTimesToCalculateEta)
Specifies whether using times from routing server (if available) is enabled to calculate ETA.abstract void
setVehicleType(VehicleType vehicleType)
Specifies vehicle type.
-
Constructor Details
-
RouteCalculationOptions
public RouteCalculationOptions()
-
-
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
Specifies route optimization. The property is ignored in walking mode. Default value is RoutingOptimization_Fastest. -
setOptimization
Specifies route optimization. The property is ignored in walking mode. -
getVehicleType
Specifies vehicle type. The property is ignored in walking mode. Default value is VehicleType_Car. -
setVehicleType
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
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
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
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
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
Route provider to be used to fetch routes from external routing server. If not specified default server is used. Default value is 'null'. -
setExternalRouteProvider
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
Creates RouteCalculationOptions with default values. -
createInWalkingMode
Creates RouteCalculationOptions with default values except the isWalkingMode property, which is initialized with 'true'. -
createWithTraffic
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.
-