diff --git a/DataStructures/TurnInstructions.h b/DataStructures/TurnInstructions.h index acaaf1cd6..484ce7ea9 100644 --- a/DataStructures/TurnInstructions.h +++ b/DataStructures/TurnInstructions.h @@ -41,8 +41,9 @@ struct TurnInstructionsClass { const static short LeaveRoundAbout = 12; const static short StayOnRoundAbout = 13; const static short StartAtEndOfStreet = 14; + const static short ReachedYourDestination = 15; - std::string TurnStrings[15]; + std::string TurnStrings[16]; std::string Ordinals[12]; //This is a hack until c++0x is available enough to use initializer lists. @@ -62,6 +63,7 @@ struct TurnInstructionsClass { TurnStrings[12] = "Leave roundabout"; TurnStrings[13] = "Stay on roundabout"; TurnStrings[14] = "Start"; + TurnStrings[15] = "You have reached your destination"; Ordinals[0] = "zeroth"; Ordinals[1] = "first"; diff --git a/Descriptors/JSONDescriptor.h b/Descriptors/JSONDescriptor.h index 54f6a0c96..5cf11d9d2 100644 --- a/Descriptors/JSONDescriptor.h +++ b/Descriptors/JSONDescriptor.h @@ -147,6 +147,22 @@ public: if(segment.necessary) ++prefixSumOfNecessarySegments; } + reply.content += ",[\""; + reply.content += TurnInstructions.TurnStrings[TurnInstructions.ReachedYourDestination]; + reply.content += "\",\""; + reply.content += "\","; + reply.content += "0"; + reply.content += ","; + intToString(prefixSumOfNecessarySegments-1, tmpLength); + reply.content += tmpLength; + reply.content += ","; + reply.content += "0"; + reply.content += ",\""; + reply.content += "\",\""; + reply.content += Azimuth::Get(0.0); + reply.content += "\","; + reply.content += "0.0"; + reply.content += "]"; } reply.content += "],"; //list all viapoints so that the client may display it