explicitly give the locations of all via locations in response
This commit is contained in:
@@ -68,7 +68,6 @@ public:
|
||||
}
|
||||
reply.status = http::Reply::ok;
|
||||
reply.content.push_back ("{");
|
||||
reply.content.push_back ("\"version\":0.3,");
|
||||
if(
|
||||
!facade->LocateClosestEndPointForCoordinate(
|
||||
routeParameters.coordinates[0],
|
||||
@@ -90,7 +89,6 @@ public:
|
||||
reply.content.push_back(tmp);
|
||||
reply.content.push_back("]");
|
||||
}
|
||||
reply.content.push_back(",\"transactionId\": \"OSRM Routing Engine JSON Locate (v0.3)\"");
|
||||
reply.content.push_back("}");
|
||||
reply.headers.resize(3);
|
||||
if(!routeParameters.jsonpParameter.empty()) {
|
||||
|
||||
@@ -76,7 +76,6 @@ public:
|
||||
|
||||
reply.status = http::Reply::ok;
|
||||
reply.content.push_back("{");
|
||||
reply.content.push_back("\"version\":0.3,");
|
||||
reply.content.push_back("\"status\":");
|
||||
if(UINT_MAX != result.edgeBasedNode) {
|
||||
reply.content.push_back("0,");
|
||||
@@ -99,7 +98,6 @@ public:
|
||||
reply.content.push_back(temp_string);
|
||||
}
|
||||
reply.content.push_back("\"");
|
||||
reply.content.push_back(",\"transactionId\":\"OSRM Routing Engine JSON Nearest (v0.3)\"");
|
||||
reply.content.push_back("}");
|
||||
reply.headers.resize(3);
|
||||
if( !routeParameters.jsonpParameter.empty() ) {
|
||||
|
||||
@@ -48,13 +48,11 @@ public:
|
||||
|
||||
reply.status = http::Reply::ok;
|
||||
reply.content.push_back("{");
|
||||
reply.content.push_back("\"version\":0.3,");
|
||||
reply.content.push_back("\"status\":");
|
||||
reply.content.push_back("0,");
|
||||
reply.content.push_back("\"timestamp\":\"");
|
||||
reply.content.push_back(facade->GetTimestamp());
|
||||
reply.content.push_back("\"");
|
||||
reply.content.push_back(",\"transactionId\":\"OSRM Routing Engine JSON timestamp (v0.3)\"");
|
||||
reply.content.push_back("}");
|
||||
reply.headers.resize(3);
|
||||
if("" != routeParameters.jsonpParameter) {
|
||||
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
|
||||
RawRouteData rawRoute;
|
||||
rawRoute.checkSum = facade->GetCheckSum();
|
||||
bool checksumOK = (routeParameters.checkSum == rawRoute.checkSum);
|
||||
const bool checksumOK = (routeParameters.checkSum == rawRoute.checkSum);
|
||||
std::vector<std::string> textCoord;
|
||||
for(unsigned i = 0; i < routeParameters.coordinates.size(); ++i) {
|
||||
if( !checkCoord(routeParameters.coordinates[i]) ) {
|
||||
@@ -110,12 +110,13 @@ public:
|
||||
);
|
||||
}
|
||||
|
||||
PhantomNodes segmentPhantomNodes;
|
||||
for(unsigned i = 0; i < phantomNodeVector.size()-1; ++i) {
|
||||
PhantomNodes segmentPhantomNodes;
|
||||
segmentPhantomNodes.startPhantom = phantomNodeVector[i];
|
||||
segmentPhantomNodes.targetPhantom = phantomNodeVector[i+1];
|
||||
rawRoute.segmentEndCoordinates.push_back(segmentPhantomNodes);
|
||||
}
|
||||
|
||||
if(
|
||||
( routeParameters.alternateRoute ) &&
|
||||
(1 == rawRoute.segmentEndCoordinates.size())
|
||||
@@ -175,7 +176,7 @@ public:
|
||||
phantomNodes.targetPhantom = rawRoute.segmentEndCoordinates[rawRoute.segmentEndCoordinates.size()-1].targetPhantom;
|
||||
desc->SetConfig(descriptorConfig);
|
||||
|
||||
desc->Run(reply, rawRoute, phantomNodes, facade);
|
||||
desc->Run(rawRoute, phantomNodes, facade, reply);
|
||||
if("" != routeParameters.jsonpParameter) {
|
||||
reply.content.push_back(")\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user