Exploration of tiny components.

This commit is contained in:
DennisOSRM
2012-07-13 17:01:21 +02:00
parent 6f78bd7a85
commit 7467e11147
9 changed files with 145 additions and 60 deletions
+9 -1
View File
@@ -65,9 +65,17 @@ public:
reply = http::Reply::stockReply(http::Reply::badRequest);
return;
}
unsigned zoomLevel = 18;
if(routeParameters.options.Find("z") != ""){
zoomLevel = atoi(routeParameters.options.Find("z").c_str());
if(18 < zoomLevel)
zoomLevel = 18;
}
//query to helpdesk
PhantomNode result;
nodeHelpDesk->FindPhantomNodeForCoordinate(myCoordinate, result);
nodeHelpDesk->FindPhantomNodeForCoordinate(myCoordinate, result, zoomLevel);
std::string tmp;
std::string JSONParameter;
+9 -8
View File
@@ -79,6 +79,13 @@ public:
return;
}
unsigned zoomLevel = 18;
if(routeParameters.options.Find("z") != ""){
zoomLevel = atoi(routeParameters.options.Find("z").c_str());
if(18 < zoomLevel)
zoomLevel = 18;
}
RawRouteData rawRoute;
rawRoute.checkSum = nodeHelpDesk->GetCheckSum();
bool checksumOK = ((unsigned)atoi(routeParameters.options.Find("checksum").c_str()) == rawRoute.checkSum);
@@ -110,7 +117,7 @@ public:
}
}
// INFO("Brute force lookup of coordinate " << i);
searchEngine->FindPhantomNodeForCoordinate( rawRoute.rawViaNodeCoordinates[i], phantomNodeVector[i]);
searchEngine->FindPhantomNodeForCoordinate( rawRoute.rawViaNodeCoordinates[i], phantomNodeVector[i], zoomLevel);
}
//unsigned distance = 0;
@@ -159,13 +166,7 @@ public:
_DescriptorConfig descriptorConfig;
unsigned descriptorType = descriptorTable[routeParameters.options.Find("output")];
unsigned short zoom = 18;
if(routeParameters.options.Find("z") != ""){
zoom = atoi(routeParameters.options.Find("z").c_str());
if(18 < zoom)
zoom = 18;
}
descriptorConfig.z = zoom;
descriptorConfig.z = zoomLevel;
if(routeParameters.options.Find("instructions") == "false") {
descriptorConfig.instructions = false;
}