Skip to content

Commit

Permalink
Additional hints are sent to the client
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisOSRM committed Feb 17, 2012
1 parent ae93423 commit a99a26a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Descriptors/JSONDescriptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,17 @@ class JSONDescriptor : public BaseDescriptor<SearchEngineT>{
reply.content += "\"checksum\":";
intToString(rawRoute.checkSum, tmp);
reply.content += tmp;
reply.content += ", \"hint_array\": [";

for(unsigned i = 0; i < rawRoute.segmentEndCoordinates.size(); ++i) {
unsigned hint = ((rawRoute.segmentEndCoordinates[i].startPhantom.edgeBasedNode << 1) + rawRoute.segmentEndCoordinates[i].startPhantom.isBidirected());
intToString(hint, tmp);
reply.content += tmp;
reply.content += ", ";
}
intToString(((rawRoute.segmentEndCoordinates.back().targetPhantom.edgeBasedNode << 1)+ rawRoute.segmentEndCoordinates.back().targetPhantom.isBidirected()), tmp);
reply.content += tmp;
reply.content += "]";
reply.content += "},";
reply.content += "\"transactionId\": \"OSRM Routing Engine JSON Descriptor (v0.3)\"";
reply.content += "}";
Expand Down

3 comments on commit a99a26a

@emiltin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what are these hints?

@DennisOSRM
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the JSON response. It's not yet documented nor finished.

@emiltin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok.

btw, let me know if i can provide any help with the remaining pull requests.

Please sign in to comment.