Class PolyshapeWriter.Encoder

  • Enclosing class:
    PolyshapeWriter

    public static class PolyshapeWriter.Encoder
    extends java.lang.Object
    Encodes a sequence of LatLngs into an encoded path string. from Apache 2.0 licensed: https://github.com/googlemaps/android-maps-utils/blob/master/library/src/com/google/maps/android/PolyUtil.java
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) long lastLat  
      (package private) long lastLng  
      (package private) java.io.Writer writer  
    • Constructor Summary

      Constructors 
      Constructor Description
      Encoder​(java.io.Writer writer)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void encode​(long v)  
      void seperator()  
      void startRing()  
      void write​(char event)  
      void write​(double latitude, double longitude)  
      void writeArg​(double value)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • lastLat

        long lastLat
      • lastLng

        long lastLng
      • writer

        final java.io.Writer writer
    • Constructor Detail

      • Encoder

        public Encoder​(java.io.Writer writer)
    • Method Detail

      • seperator

        public void seperator()
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • startRing

        public void startRing()
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • write

        public void write​(char event)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • writeArg

        public void writeArg​(double value)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • write

        public void write​(double latitude,
                          double longitude)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • encode

        private void encode​(long v)
                     throws java.io.IOException
        Throws:
        java.io.IOException