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 to the given budget and consumption parameters. It uses Calculate Reachable Range API where you can find all details in the service documentation.
Sample use case: You are preparing for a trip and you would like to check how far you can drive on your battery or tank, or within a specific time limit so you can plan your journey.
The following example shows a number of points that are reachable based on one of the specified models 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 following code sample to implement a similar use case.
To request a reachable range create a ReachableRangeQuery:
The result can be observed with TTReachableRangeDelegate:
Fuel budget: 5 liters
Energy budget: 5 kWh
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 the Geometry search features of the Maps SDK.
Sample use case: You are preparing a trip for the weekend and you want to check how far you can get by electric car, electric car with time budget, and non-electric car.
To achieve this, first you have to create a compound query:
This example shows how Reachable Range calculations for multiple vehicle types and time budgets can be retrieved with a single Request to the Batch Routing service. For each vehicle type, you can see how its type and time budget will affect ranges returned as a result. These ranges are then visualised as polylines on the map. You can obtain the description of each reachable range by clicking the polylines.
Three possible reachable ranges from Amsterdam by electric car, combustion, and electric car with time budget for 2 hours