Package com.graphhopper.jackson
Class ResponsePathSerializer
java.lang.Object
com.graphhopper.jackson.ResponsePathSerializer
Code which constructs the JSON response of the routing API, including polyline encoding.
The necessary information for polyline encoding is in this answer: http://stackoverflow.com/a/24510799/194609 with a link to official Java sources as well as to a good explanation.
- Author:
- Peter Karich
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
encodePolyline
(PointList poly, boolean includeElevation, double multiplier) static com.fasterxml.jackson.databind.node.ObjectNode
jsonObject
(GHResponse ghRsp, ResponsePathSerializer.Info info, boolean enableInstructions, boolean calcPoints, boolean enableElevation, boolean pointsEncoded, double pointsMultiplier)
-
Constructor Details
-
ResponsePathSerializer
public ResponsePathSerializer()
-
-
Method Details
-
encodePolyline
-
jsonObject
public static com.fasterxml.jackson.databind.node.ObjectNode jsonObject(GHResponse ghRsp, ResponsePathSerializer.Info info, boolean enableInstructions, boolean calcPoints, boolean enableElevation, boolean pointsEncoded, double pointsMultiplier)
-