|
Routify Documentation
|
Public Member Functions | |
| ResponseEntity< JSONArray > | calcRoute (@PathVariable String routingMode, @RequestBody String request, @RequestParam(defaultValue="true") boolean directions, @RequestParam(defaultValue="true") boolean traveltime) throws Exception |
Handles routing-related API endpoints for the COSS Maps application. This controller is responsible for processing incoming requests to calculate routes based on different criteria such as distance, greenery, slope, noise, air quality, and traffic conditions. It supports multiple routing modes to provide users with the best possible paths according to their preferences.
This class utilizes an ExecutorService to handle route calculations in parallel, improving performance and responsiveness of the routing API. Each routing mode endpoint accepts a request body containing the necessary information to compute the route and returns a JSON object with the route information.
In case of errors during route calculation, it responds with an appropriate error message and HTTP status code.
|
inline |