Adds a limit for number of results returned in Nearest service, resolves #2872
This commit is contained in:
committed by
Moritz Kobitzsch
parent
e6fe9d0d67
commit
e3c1b133bf
@@ -63,7 +63,8 @@ inline unsigned generateServerProgramOptions(const int argc,
|
||||
int &max_locations_trip,
|
||||
int &max_locations_viaroute,
|
||||
int &max_locations_distance_table,
|
||||
int &max_locations_map_matching)
|
||||
int &max_locations_map_matching,
|
||||
int &max_results_nearest)
|
||||
{
|
||||
using boost::program_options::value;
|
||||
using boost::filesystem::path;
|
||||
@@ -100,7 +101,10 @@ inline unsigned generateServerProgramOptions(const int argc,
|
||||
"Max. locations supported in distance table query") //
|
||||
("max-matching-size",
|
||||
value<int>(&max_locations_map_matching)->default_value(100),
|
||||
"Max. locations supported in map matching query");
|
||||
"Max. locations supported in map matching query") //
|
||||
("max-nearest-size",
|
||||
value<int>(&max_results_nearest)->default_value(100),
|
||||
"Max. results supported in nearest query");
|
||||
|
||||
// hidden options, will be allowed on command line, but will not be shown to the user
|
||||
boost::program_options::options_description hidden_options("Hidden options");
|
||||
@@ -189,7 +193,8 @@ int main(int argc, const char *argv[]) try
|
||||
config.max_locations_trip,
|
||||
config.max_locations_viaroute,
|
||||
config.max_locations_distance_table,
|
||||
config.max_locations_map_matching);
|
||||
config.max_locations_map_matching,
|
||||
config.max_results_nearest);
|
||||
if (init_result == INIT_OK_DO_NOT_START_ENGINE)
|
||||
{
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user