Routify Documentation
Loading...
Searching...
No Matches
ch.routify.controllers.RoutingController Class Reference

Public Member Functions

ResponseEntity< JSONArray > calcRoute (@PathVariable String routingMode, @RequestBody String request, @RequestParam(defaultValue="true") boolean directions, @RequestParam(defaultValue="true") boolean traveltime) throws Exception
 

Detailed Description

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.

Author
Alexander Eggerth
Version
1.0

Member Function Documentation

◆ calcRoute()

ResponseEntity< JSONArray > ch.routify.controllers.RoutingController.calcRoute ( @PathVariable String routingMode,
@RequestBody String request,
@RequestParam(defaultValue="true") boolean directions,
@RequestParam(defaultValue="true") boolean traveltime ) throws Exception
inline

The documentation for this class was generated from the following file: