TTCommonQueryBuilder

@interface TTCommonQueryBuilder<__covariant ObjectType> : NSObject

TTCommonQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withWayPoints:(CLLocationCoordinate2D *_Nonnull)wayPoints
                                   count:(NSUInteger)count;

    Swift

    func withWayPoints(_ wayPoints: UnsafeMutablePointer<CLLocationCoordinate2D>, count: UInt) -> ObjectType

    Parameters

    wayPoints

    The array of map coordinate whose geographical information your way points

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withWayPoints:(NSArray<NSValue *> *_Nonnull)wayPoints;

    Swift

    func withWayPoints(_ wayPoints: [NSValue]) -> ObjectType

    Parameters

    wayPoints

    The array of map coordinate whose geographical information your way points

    Return Value

    TTRouteQueryBuilder

  • circle with a center point and a radius (in meters). The radius must be a positive integer with the maximum value of 20050000. Note that larger integer values will not be rejected but lowered to the maximum value.

    Declaration

    Objective-C

    - (ObjectType _Nonnull)withCircles:(TTLocationCircle *_Nonnull)circles
                             withCount:(NSUInteger)count;

    Swift

    func withCircles(_ circles: UnsafeMutablePointer<TTLocationCircle>, withCount count: UInt) -> ObjectType
  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withRouteType:(TTOptionTypeRoute)routeType;

    Swift

    func withRouteType(_ routeType: TTOptionTypeRoute) -> ObjectType

    Parameters

    routeType

    The map coordinate whose geographical information your destination position.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withTraffic:(BOOL)isTraffic;

    Swift

    func withTraffic(_ isTraffic: Bool) -> ObjectType

    Parameters

    isTraffic

    Do consider all available traffic information during routing

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withAvoidType:(TTOptionTypeAvoid)avoidType;

    Swift

    func withAvoidType(_ avoidType: TTOptionTypeAvoid) -> ObjectType

    Parameters

    avoidType

    Specifies something that the route calculation should try to avoid when determining the route. Can be specified multiple times.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withDepartAt:(NSDate *_Nonnull)departAt;

    Swift

    func withDepartAt(_ departAt: Date) -> ObjectType

    Parameters

    departAt

    The date and time of departure from the origin point.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withTravelMode:(TTOptionTravelMode)travelMode;

    Swift

    func withTravelMode(_ travelMode: TTOptionTravelMode) -> ObjectType

    Parameters

    travelMode

    The mode of travel for the requested route.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withVehicleEngineType:
        (TTOptionVehicleEngineType)vehicleEngineType;

    Swift

    func withVehicleEngineType(_ vehicleEngineType: TTOptionVehicleEngineType) -> ObjectType

    Parameters

    vehicleEngineType

    Engine type of the vehicle. When a detailed Consumption Model is specified, it must be consistent with the value of vehicleEngineType.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withVehicleMaxSpeed:(NSUInteger)vehicleMaxSpeed;

    Swift

    func withVehicleMaxSpeed(_ vehicleMaxSpeed: UInt) -> ObjectType

    Parameters

    vehicleMaxSpeed

    Maximum speed of the vehicle in km/hour.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withVehicleWeight:(NSUInteger)vehicleWeight;

    Swift

    func withVehicleWeight(_ vehicleWeight: UInt) -> ObjectType

    Parameters

    vehicleWeight

    Weight of the vehicle in kilograms.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withVehicleAxleWeight:(NSUInteger)vehicleAxleWeight;

    Swift

    func withVehicleAxleWeight(_ vehicleAxleWeight: UInt) -> ObjectType

    Parameters

    vehicleAxleWeight

    Weight per axle of the vehicle in kg

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withVehicleLength:(double)vehicleLength;

    Swift

    func withVehicleLength(_ vehicleLength: Double) -> ObjectType

    Parameters

    vehicleLength

    Length of the vehicle in meters.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withVehicleWidth:(double)vehicleWidth;

    Swift

    func withVehicleWidth(_ vehicleWidth: Double) -> ObjectType

    Parameters

    vehicleWidth

    Width of the vehicle in meters.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withVehicleHeight:(double)vehicleHeight;

    Swift

    func withVehicleHeight(_ vehicleHeight: Double) -> ObjectType

    Parameters

    vehicleHeight

    Height of the vehicle in meters.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withVehicleCommercial:(BOOL)isVehicleCommercial;

    Swift

    func withVehicleCommercial(_ isVehicleCommercial: Bool) -> ObjectType

    Parameters

    isVehicleCommercial

    Vehicle is used for commercial purposes and thus may not be allowed to drive on some roads.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withVehicleLoadType:
        (TTOptionVehicleLoadType)vehicleLoadType;

    Swift

    func withVehicleLoadType(_ vehicleLoadType: TTOptionVehicleLoadType) -> ObjectType

    Parameters

    vehicleLoadType

    Types of cargo that may be classified as hazardous materials and restricted from some roads.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withVehicleAdrTunnelRestrictionCode:
        (TTOptionVehicleAdrTunnelRestrictionCode)vehicleAdrTunnelRestrictionCode;

    Swift

    func withVehicleAdrTunnelRestrictionCode(_ vehicleAdrTunnelRestrictionCode: TTOptionVehicleAdrTunnelRestrictionCode) -> ObjectType

    Parameters

    vehicleAdrTunnelRestrictionCode

    ADR tunnel restriction category code.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withHilliness:(TTOptionHilliness)hilliness;

    Swift

    func withHilliness(_ hilliness: TTOptionHilliness) -> ObjectType

    Parameters

    hilliness

    Degree of hilliness for thrilling route.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withWindingness:(TTOptionWindingness)windingness;

    Swift

    func withWindingness(_ windingness: TTOptionWindingness) -> ObjectType

    Parameters

    windingness

    Level of turns for thrilling route.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withReport:(NSString *_Nonnull)report;

    Swift

    func withReport(_ report: String) -> ObjectType

    Parameters

    report

    Specifies which data should be reported for diagnosis purposes.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withCurrentFuelInLiters:(double)currentFuelInLiters;

    Swift

    func withCurrentFuel(inLiters currentFuelInLiters: Double) -> ObjectType

    Parameters

    currentFuelInLiters

    Specifies the current supply of fuel in liters.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withCurrentAuxiliaryPowerInLitersPerHour:
        (double)auxiliaryPowerInLitersPerHour;

    Swift

    func withCurrentAuxiliaryPower(inLitersPerHour auxiliaryPowerInLitersPerHour: Double) -> ObjectType

    Parameters

    auxiliaryPowerInLitersPerHour

    Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, in liters per hour. It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withFuelEnergyDensityInMJoulesPerLiter:
        (double)fuelEnergyDensityInMJoulesPerLiter;

    Swift

    func withFuelEnergyDensity(inMJoulesPerLiter fuelEnergyDensityInMJoulesPerLiter: Double) -> ObjectType

    Parameters

    fuelEnergyDensityInMJoulesPerLiter

    Specifies the amount of chemical energy stored in one liter of fuel in megajoules (MJ). It is used in conjunction with the *Efficiency parameters for conversions between saved or consumed energy and fuel. For example, energy density is 34.2 MJ/l for gasoline, and 35.8 MJ/l for Diesel fuel.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withAccelerationEfficiency:
        (double)accelerationEfficiency;

    Swift

    func withAccelerationEfficiency(_ accelerationEfficiency: Double) -> ObjectType

    Parameters

    accelerationEfficiency

    Specifies the efficiency of converting chemical energy stored in fuel to kinetic energy when the vehicle accelerates (i.e. KineticEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed is obtained by converting consumed fuel to chemical energy using fuelEnergyDensityInMJoulesPerLiter.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withDecelerationEfficiency:
        (double)decelerationEfficiency;

    Swift

    func withDecelerationEfficiency(_ decelerationEfficiency: Double) -> ObjectType

    Parameters

    decelerationEfficiency

    Specifies the efficiency of converting kinetic energy to saved (not consumed) fuel when the vehicle decelerates (i.e. ChemicalEnergySaved/KineticEnergyLost). ChemicalEnergySaved is obtained by converting saved (not consumed) fuel to energy using fuelEnergyDensityInMJoulesPerLiter.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withUphillEfficiency:(double)uphillEfficiency;

    Swift

    func withUphillEfficiency(_ uphillEfficiency: Double) -> ObjectType

    Parameters

    uphillEfficiency

    Specifies the efficiency of converting kinetic energy to saved (not consumed) fuel when the vehicle decelerates (i.e. ChemicalEnergySaved/KineticEnergyLost). ChemicalEnergySaved is obtained by converting saved (not consumed) fuel to energy using fuelEnergyDensityInMJoulesPerLiter.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withDownhillEfficiency:(double)downhillEfficiency;

    Swift

    func withDownhillEfficiency(_ downhillEfficiency: Double) -> ObjectType

    Parameters

    downhillEfficiency

    Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation (i.e. ChemicalEnergySaved/PotentialEnergyLost). ChemicalEnergySaved is obtained by converting saved (not consumed) fuel to energy using fuelEnergyDensityInMJoulesPerLiter.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withCurrentChargeInkWh:(double)currentChargeInkWh;

    Swift

    func withCurrentChargeInkWh(_ currentChargeInkWh: Double) -> ObjectType

    Parameters

    currentChargeInkWh

    Specifies the current electric energy supply in kilowatt hours (kWh).

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withMaxChargeInkWh:(double)maxChargeInkWh;

    Swift

    func withMaxChargeInkWh(_ maxChargeInkWh: Double) -> ObjectType

    Parameters

    maxChargeInkWh

    Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in the vehicle’s battery.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withAuxiliaryPowerInkW:(double)auxiliaryPowerInkW;

    Swift

    func withAuxiliaryPowerInkW(_ auxiliaryPowerInkW: Double) -> ObjectType

    Parameters

    auxiliaryPowerInkW

    Specifies the maximum electric energy supply in kilowatt hours (kWh) that may be stored in the vehicle’s battery.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withAvoidVignettesArray:
        (NSArray<NSString *> *_Nonnull)avoidVignettes;

    Swift

    func withAvoidVignettesArray(_ avoidVignettes: [String]) -> ObjectType

    Parameters

    avoidVignettes

    List of 3-character ISO 3166-1 alpha-3 country codes of countries in which all toll roads with vignettes are to be avoided.

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withAvoidArea:(id)avoidArea count:(NSUInteger)count;

    Swift

    func withAvoidArea(_ avoidArea: Any!, count: UInt) -> ObjectType

    Parameters

    avoidArea

    The array of TTLatLngBounds whose geographical information your avoid area

    count

    The count array of TTLatLngBounds

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withSpeedConsumptionInLitersPairs:
                               (TTSpeedConsumption *_Nonnull)
                                   speedConsumptionInLitersPairs
                                                       count:(NSUInteger)count;

    Swift

    func withSpeedConsumption(inLitersPairs speedConsumptionInLitersPairs: UnsafeMutablePointer<TTSpeedConsumption>, count: UInt) -> ObjectType

    Parameters

    speedConsumptionInLitersPairs

    Specifies the speed-dependent component of consumption. Provided as an unordered list of speed/consumption-rate in liters pairs.

    count

    Count of elements TTSpeedConsumption

    Return Value

    TTRouteQueryBuilder

  • Declaration

    Objective-C

    - (ObjectType _Nonnull)withSpeedConsumptionInkWhPairs:
                               (TTSpeedConsumption *_Nonnull)
                                   speedConsumptionInkWhPairs
                                                    count:(NSUInteger)count;

    Swift

    func withSpeedConsumptionInkWhPairs(_ speedConsumptionInkWhPairs: UnsafeMutablePointer<TTSpeedConsumption>, count: UInt) -> ObjectType

    Parameters

    speedConsumptionInkWhPairs

    Specifies the speed-dependent component of consumption. Provided as an unordered list of speed/consumption-rate in kWh pairs.

    count

    Count of elements TTSpeedConsumption

    Return Value

    TTRouteQueryBuilder