This class compress the travel to reduce the size of the file when saved to a file or decompress the travel when reading from a file. Each route of a compressed file have the ItineraryPoints in only one object and the lat and lng of the ItineraryPoints are encoded with the polyline.encode algorithm
Compress the currently edited travel
Name | Type | Description |
---|---|---|
travel | Travel | The object to compress |
Decompress a travel
Name | Type | Description |
---|---|---|
travelJsonObject | JsonObject | The compressed travel. travelJsonObject is not a Travel instance! It's an Object created with JSON.parse ( ). |
Compress a route
Name | Type | Description |
---|---|---|
routeJsonObject | JsonObject | The route to compress. routeJsonObject is not a Route instance! It's an Object created with Route.jsonObject ( ). |
Decompress a route
Name | Type | Description |
---|---|---|
routeJsonObject | JsonObject | The compressed route. routeJsonObject is not a Route instance! It's an Object created with JSON.parse ( ). |