@DeprecatedSince(2020, 6) class MatrixRoutingQueryBuilder
The default builder for MatrixRoutingQuery objects.
MatrixRoutingQueryBuilder(origins: List<LatLng>, destinations: List<LatLng>)
The default builder for MatrixRoutingQuery objects. |
fun build(): MatrixRoutingQuery
Creates new instance of MatrixRoutingQuery. |
|
fun withAccelerationEfficiency(accelerationEfficiency: Double): MatrixRoutingQueryBuilder
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. Applicable only for combustion engines. If used at all, must be used in conjunction with .withAccelerationEfficiency. If used, .withVehicleWeightInKg has to be used as well. |
|
fun withAdrTunnelRestrictionCode(adrTunnelRestrictionCode: AdrTunnelRestrictionCode?): MatrixRoutingQueryBuilder
If vehicleAdrTunnelRestrictionCode is specified, the vehicle is subject to ADR tunnel restrictions. |
|
fun withAuxiliaryPowerInKW(auxiliaryPowerInKW: Double?): MatrixRoutingQueryBuilder
Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts (kW). It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc. |
|
fun withAuxiliaryPowerInLitersPerHour(auxiliaryPowerInLitersPerHour: Double): MatrixRoutingQueryBuilder
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. Applicable only for combustion engines. |
|
fun withAvoidList(avoidList: List<Avoid>): MatrixRoutingQueryBuilder
Specifies what the route calculation should try to avoid when determining the route. Can be specified multiple times. |
|
fun withAvoidType(avoidType: Avoid): MatrixRoutingQueryBuilder
Specifies what the route calculation should try to avoid when determining the route. Can be specified multiple times. |
|
fun withConsiderTraffic(considerTraffic: Boolean): MatrixRoutingQueryBuilder
Specifies if all available traffic information should be considered during routing. |
|
fun withConstantSpeedConsumptionInKWhPerHundredKm(constantSpeedConsumptionInKWhPerHundredKm: SpeedToConsumptionMap?): MatrixRoutingQueryBuilder
Specifies the speed-dependent component of consumption. Provided as an unordered list of speed/consumption-rate in kWh pairs. Applicable only for electric engines. |
|
fun withConstantSpeedConsumptionInLitersPerHundredKm(constantSpeedConsumptionInLitersPerHundredKm: SpeedToConsumptionMap): MatrixRoutingQueryBuilder
Specifies the speed-dependent component of consumption. Provided as an unordered list of speed/consumption-rate in liters-per-100km pairs. Applicable only for combustion engines. |
|
fun withCurrentChargeInKWh(currentChargeInKWh: Double?): MatrixRoutingQueryBuilder
Specifies the current electric energy supply in kilowatt hours (kWh). Applicable only for electric engines. If used at all, must be used in conjunction with MatrixRoutingQueryBuilder.withMaxChargeInKWh. |
|
fun withCurrentFuelInLiters(currentFuelInLiters: Double): MatrixRoutingQueryBuilder
Specifies the current supply of fuel in liters. Applicable only for combustion engines. |
|
fun withDecelerationEfficiency(decelerationEfficiency: Double?): MatrixRoutingQueryBuilder
Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation (i.e. PotentialEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed is obtained by converting consumed fuel to chemical energy using fuelEnergyDensityInMJoulesPerLiter. Applicable only for combustion engines. If used at all, must be used in conjunction with .withDownhillEfficiency. If used, .withVehicleWeightInKg has to be used as well. |
|
fun withDepartAt(departAt: Date): MatrixRoutingQueryBuilder
Specifies the departure time. |
|
fun withDownhillEfficiency(downhillEfficiency: Double?): MatrixRoutingQueryBuilder
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. Applicable only for combustion engines. If used at all, must be used in conjunction with MatrixRoutingQueryBuilder.withUphillEfficiency. If used, MatrixRoutingQueryBuilder.withVehicleWeightInKg has to be used as well. |
|
fun withFuelEnergyDensityInMJoulesPerLiter(fuelEnergyDensityInMJoulesPerLiter: Double): MatrixRoutingQueryBuilder
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. Applicable only for combustion engines. |
|
fun withHilliness(hilliness: Hilliness): MatrixRoutingQueryBuilder
Specifies the hilliness type for route calculation. |
|
fun withMaxChargeInKWh(maxChargeInKWh: Double?): MatrixRoutingQueryBuilder
Specifies the capacity of the vehicle's battery in kilowatt hours (kWh). Applicable only for electric engines. If used at all, must be used in conjunction with MatrixRoutingQueryBuilder.withCurrentChargeInKWh. |
|
fun withRouteType(routeType: RouteType): MatrixRoutingQueryBuilder
Specifies the route type. |
|
fun withTravelMode(travelMode: TravelMode): MatrixRoutingQueryBuilder
Specifies the travel mode for route calculation. |
|
fun withUphillEfficiency(uphillEfficiency: Double): MatrixRoutingQueryBuilder
Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation (i.e. PotentialEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed is obtained by converting consumed fuel to chemical energy using fuelEnergyDensityInMJoulesPerLiter. Applicable only for combustion engines. If used at all, must be used in conjunction with MatrixRoutingQueryBuilder.withDownhillEfficiency. If used, .withVehicleWeightInKg has to be used as well. |
|
fun withVehicleAxleWeightInKg(vehicleAxleWeightInKg: Int): MatrixRoutingQueryBuilder
Specifies the vehicle axle weight for route calculation. |
|
fun withVehicleCommercial(vehicleCommercial: Boolean): MatrixRoutingQueryBuilder
Specifies if the vehicle is used for commercial to calculate route. |
|
fun withVehicleEngineType(vehicleEngineType: VehicleEngineType): MatrixRoutingQueryBuilder
Specifies the vehicle engine type for route query. |
|
fun withVehicleHeightInMeters(vehicleHeightInMeters: Double): MatrixRoutingQueryBuilder
Specifies the vehicle height for route calculation. |
|
fun withVehicleLengthInMeters(vehicleLengthInMeters: Double): MatrixRoutingQueryBuilder
Specifies the vehicle length for route calculation. |
|
fun withVehicleLoadType(vehicleLoadType: VehicleLoadType): MatrixRoutingQueryBuilder
Specifies the vehicle load type for route calculation. |
|
fun withVehicleMaxSpeedInKph(vehicleMaxSpeedInKph: Int): MatrixRoutingQueryBuilder
Specifies the vehicle max speed for route calculation. |
|
fun withVehicleWeightInKg(vehicleWeightInKg: Int): MatrixRoutingQueryBuilder
Specifies the vehicle weight in kilograms for route calculation. |
|
fun withVehicleWidthInMeters(vehicleWidthInMeters: Double): MatrixRoutingQueryBuilder
Specifies the vehicle width for route calculation. |
|
fun withWindingness(windingness: Windingness): MatrixRoutingQueryBuilder
Specifies the windingness type for route calculation. |
fun create(origins: List<LatLng>, destinations: List<LatLng>): MatrixRoutingQueryBuilder
Creates an instance of MatrixRoutingQueryBuilder with given origins and destinations lists. |