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
  • Field Details

    • COPYRIGHTS

      public static final List<String> COPYRIGHTS
      This includes the required attribution for OpenStreetMap. Do not hesitate to mention us and link us in your about page https://support.graphhopper.com/support/search/solutions?term=attribution
  • Constructor Details

    • ResponsePathSerializer

      public ResponsePathSerializer()
  • Method Details

    • encodePolyline

      public static String encodePolyline(PointList poly, boolean includeElevation, double precision)
    • jsonObject

      public static com.fasterxml.jackson.databind.node.ObjectNode jsonObject(GHResponse ghRsp, String osmDate, boolean enableInstructions, boolean calcPoints, boolean enableElevation, boolean pointsEncoded, double took)