From 1c50c55a42d48beac7cc2f3acf37673938142a1f Mon Sep 17 00:00:00 2001 From: DennisOSRM Date: Wed, 12 Sep 2012 15:35:21 +0200 Subject: [PATCH] Fixing hint ordering for via routes --- Plugins/RouteParameters.h | 49 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/Plugins/RouteParameters.h b/Plugins/RouteParameters.h index f686e11bc..e4fc99d7f 100644 --- a/Plugins/RouteParameters.h +++ b/Plugins/RouteParameters.h @@ -42,6 +42,55 @@ struct RouteParameters { std::vector hints; std::vector<_Coordinate> coordinates; typedef HashTable::MyIterator OptionsIterator; + + void setZoomLevel(const short i) { + if (18 > i && 0 < i) + zoomLevel = i; + } + + void setChecksum(const int c) { + checkSum = c; + } + + void setInstructionFlag(const bool b) { + printInstructions = b; + } + + void printService( const std::string & s) { + service = s; + } + + void setOutputFormat(const std::string & s) { + outputFormat = s; + } + + void setJSONpParameter(const std::string & s) { + jsonpParameter = s; + } + + void addHint(const std::string & s) { + hints.resize(coordinates.size()); + hints.back() = s; + } + + void setLanguage(const std::string & s) { + language = s; + } + + void setGeometryFlag(const bool b) { + geometry = b; + } + + void setCompressionFlag(const bool b) { + compression = b; + } + + void addCoordinate(boost::fusion::vector < double, double > arg_) { + int lat = 100000.*boost::fusion::at_c < 0 > (arg_); + int lon = 100000.*boost::fusion::at_c < 1 > (arg_); + _Coordinate myCoordinate(lat, lon); + coordinates.push_back(_Coordinate(lat, lon)); + } };