rebasing branch on develop and adding new API features

This commit is contained in:
DennisOSRM
2012-11-14 12:01:19 +01:00
parent 954710d6cc
commit aeff6c8caa
3 changed files with 18 additions and 4 deletions
+11 -1
View File
@@ -29,11 +29,13 @@ or see http://www.gnu.org/licenses/agpl.txt.
#include "../DataStructures/Coordinate.h"
struct RouteParameters {
RouteParameters() : zoomLevel(18), printInstructions(false), geometry(true), compression(true), checkSum(-1) {}
RouteParameters() : zoomLevel(18), printInstructions(false), alternateRoute(true), geometry(true), compression(true), deprecatedAPI(false), checkSum(-1) {}
short zoomLevel;
bool printInstructions;
bool alternateRoute;
bool geometry;
bool compression;
bool deprecatedAPI;
int checkSum;
std::string service;
std::string outputFormat;
@@ -48,6 +50,14 @@ struct RouteParameters {
zoomLevel = i;
}
void setAlternateRouteFlag(const bool b) {
alternateRoute = b;
}
void setDeprecatedAPIFlag(const std::string &) {
deprecatedAPI = true;
}
void setChecksum(const int c) {
checkSum = c;
}
+1 -1
View File
@@ -110,7 +110,7 @@ public:
segmentPhantomNodes.targetPhantom = phantomNodeVector[i+1];
rawRoute.segmentEndCoordinates.push_back(segmentPhantomNodes);
}
if(( "false" != routeParameters.options.Find("alt") ) && (1 == rawRoute.segmentEndCoordinates.size())) {
if( ( routeParameters.alternateRoute ) && (1 == rawRoute.segmentEndCoordinates.size()) ) {
// INFO("Checking for alternative paths");
searchEngine->alternativePaths(rawRoute.segmentEndCoordinates[0], rawRoute);