Class ResponsePathSerializer

java.lang.Object
com.graphhopper.jackson.ResponsePathSerializer

public class ResponsePathSerializer extends Object
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
  • Constructor Details

    • ResponsePathSerializer

      public ResponsePathSerializer()
  • Method Details

    • encodePolyline

      public static String encodePolyline(PointList poly, boolean includeElevation, double multiplier)
    • 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)