mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-21 13:53:37 +00:00
[routing][traffic] Different routing options in navigation and decoder mode
Signed-off-by: mvglasow <michael -at- vonglasow.com>
This commit is contained in:
@@ -1091,10 +1091,15 @@ RouterResultCode IndexRouter::AdjustRoute(Checkpoints const & checkpoints, m2::P
|
||||
return RouterResultCode::NoError;
|
||||
}
|
||||
|
||||
RoutingOptions IndexRouter::GetRoutingOptions()
|
||||
{
|
||||
return RoutingOptions::LoadCarOptionsFromSettings();
|
||||
}
|
||||
|
||||
unique_ptr<WorldGraph> IndexRouter::MakeWorldGraph()
|
||||
{
|
||||
// Use saved routing options for all types (car, bicycle, pedestrian).
|
||||
RoutingOptions const routingOptions = RoutingOptions::LoadCarOptionsFromSettings();
|
||||
RoutingOptions const routingOptions = GetRoutingOptions();
|
||||
/// @DebugNote
|
||||
// Add avoid roads here for debug purpose.
|
||||
// routingOptions.Add(RoutingOptions::Road::Motorway);
|
||||
|
||||
@@ -175,6 +175,14 @@ protected:
|
||||
*/
|
||||
virtual Mode GetMode() { return Mode::Navigation; }
|
||||
|
||||
/**
|
||||
* @brief Returns current routing options.
|
||||
*
|
||||
* In this class, the routing options are the one set in the GUI. Subclasses may override this
|
||||
* method to provide different routing options.
|
||||
*/
|
||||
virtual RoutingOptions GetRoutingOptions();
|
||||
|
||||
private:
|
||||
RouterResultCode CalculateSubrouteJointsMode(IndexGraphStarter & starter, RouterDelegate const & delegate,
|
||||
std::shared_ptr<AStarProgress> const & progress,
|
||||
|
||||
Reference in New Issue
Block a user