Sorry, you need to enable JavaScript to visit this website.

Reachable range

Reachable range

The Reachable Range component calculates a set of locations that can be reached from the origin point. It optimizes for routes with a given route-type (e.g. fastest, eco, etc) but limits the range for the given budget and consumption parameters.
It uses Calculate Reachable Range API so you can find all details in the service documentation.

Sample use case: You are preparing to a trip and you would like to check how far you can drive on your battery or tank, or within specific time limit so you plan your journey.

The example below shows a number of points that are reachable based on one of specified model for:
* Combustion engine
* Electric engine
* Time-2h limit on an electric car (time budget model is available for both electric and combustion engines)

Use the code sample below for implementing a similar use case.

To request a reachable range create a ReachableRangeQuery:

query = [[[[[[[[[[[[[TTReachableRangeQueryBuilder createWithCenterLocation:COORDINATE_AMSTERDAM] withSpeedConsumptionInLitersPairs:consumption count:1]
                 withVehicleWeight:1600]
                withCurrentFuelInLiters:43]
               withFuelEnergyDensityInMJoulesPerLiter:34.2]
              withCurrentAuxiliaryPowerInLitersPerHour:1.7]
             withAccelerationEfficiency:0.33]
            withDecelerationEfficiency:0.33]
           withUphillEfficiency:0.33]
          withDownhillEfficiency:0.33]
         withVehicleEngineType:TTOptionVehicleEngineTypeCombustion]
        withFuelBudgetInLiters:5]
    build];

The result can be observed with TTReachableRangeDelegate:

- (void)reachableRange:(TTReachableRange *)range completedWithResult:(TTReachableRangeResponse *)response {
}

- (void)reachableRange:(TTReachableRange *)range completedWithResponseError:(TTResponseError *)responseError {
}


image

Fuel budget: 5 liters

image

Energy budget: 5 kWh

image

Time budget: 2h

You can use the output of the returned set of locations for other interacting use cases e.g. searching for places on the route to one (many) reachable point(s) with Search along the route or within the polygon boundaries with Geometry search features of Maps SDK.

You are here