PolylineEncoder { public static EncodedPolylineBean createEncodings(double[] lat, double[] lon) { return createEncodings(new PointAdapterList(lat, lon)); }  static EncodedPolylineBean createEncodings(double[] lat, double[] lon); static EncodedPolylineBean createEncodings(double[] lat, double[] lon,
      int level); static EncodedPolylineBean createEncodings(double[] lat, double[] lon,
      int offset, int length, int level); static EncodedPolylineBean createEncodings(
      Iterable<CoordinatePoint> points); static EncodedPolylineBean createEncodings(
      Iterable<CoordinatePoint> points, int level); static List<CoordinatePoint> decode(EncodedPolylineBean polyline); static List<CoordinatePoint> decode(String pointString); static String encodeSignedNumber(int num); static int decodeSignedNumber(String value); static int[] decodeSignedNumberWithIndex(String value, int index); static String encodeNumber(int num); static int decodeNumber(String value); static int[] decodeNumberWithIndex(String value, int index);  }
@Test public void test3() { double[] lat = {47.67839087880088, 47.67845871865856, 47.682076843204875}; double[] lon = { -122.27878118907307, -122.27342376951559, -122.2735240417865}; String expected = "}d_bHlqiiVKo`@sUR"; EncodedPolylineBean actual = PolylineEncoder.createEncodings(lat, lon, 0); Assert.assertEquals(expected, actual.getPoints()); }
@Test public void test4() { double[] lat = { 47.3, 47.67839087880088, 47.67845871865856, 47.682076843204875, 47.4}; double[] lon = { -122.3, -122.27878118907307, -122.27342376951559, -122.2735240417865, -122.4}; String expected = "}d_bHlqiiVKo`@sUR"; EncodedPolylineBean actual = PolylineEncoder.createEncodings(lat, lon, 1, 3, 0); Assert.assertEquals(expected, actual.getPoints()); }