Class KmlPolygon

  • All Implemented Interfaces:
    DataPolygon<java.util.ArrayList<java.util.ArrayList<com.google.android.gms.maps.model.LatLng>>>, Geometry

    public class KmlPolygon
    extends java.lang.Object
    implements DataPolygon<java.util.ArrayList<java.util.ArrayList<com.google.android.gms.maps.model.LatLng>>>
    Represents a KML Polygon. Contains a single array of outer boundary coordinates and an array of arrays for the inner boundary coordinates.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String GEOMETRY_TYPE  
    • Constructor Summary

      Constructors 
      Constructor Description
      KmlPolygon​(java.util.List<com.google.android.gms.maps.model.LatLng> outerBoundaryCoordinates, java.util.List<java.util.List<com.google.android.gms.maps.model.LatLng>> innerBoundaryCoordinates)
      Creates a new KmlPolygon object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.util.List<com.google.android.gms.maps.model.LatLng>> getGeometryObject()
      Gets the coordinates of the Polygon
      java.lang.String getGeometryType()
      Gets the type of geometry
      java.util.List<java.util.List<com.google.android.gms.maps.model.LatLng>> getInnerBoundaryCoordinates()
      Gets an array of arrays of inner boundary coordinates
      java.util.List<com.google.android.gms.maps.model.LatLng> getOuterBoundaryCoordinates()
      Gets an array of outer boundary coordinates
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • KmlPolygon

        public KmlPolygon​(java.util.List<com.google.android.gms.maps.model.LatLng> outerBoundaryCoordinates,
                          java.util.List<java.util.List<com.google.android.gms.maps.model.LatLng>> innerBoundaryCoordinates)
        Creates a new KmlPolygon object
        Parameters:
        outerBoundaryCoordinates - single array of outer boundary coordinates
        innerBoundaryCoordinates - multiple arrays of inner boundary coordinates
    • Method Detail

      • getGeometryType

        public java.lang.String getGeometryType()
        Gets the type of geometry
        Specified by:
        getGeometryType in interface Geometry
        Returns:
        type of geometry
      • getGeometryObject

        public java.util.List<java.util.List<com.google.android.gms.maps.model.LatLng>> getGeometryObject()
        Gets the coordinates of the Polygon
        Specified by:
        getGeometryObject in interface Geometry
        Returns:
        ArrayList of an ArrayList of LatLng points
      • getOuterBoundaryCoordinates

        public java.util.List<com.google.android.gms.maps.model.LatLng> getOuterBoundaryCoordinates()
        Gets an array of outer boundary coordinates
        Specified by:
        getOuterBoundaryCoordinates in interface DataPolygon<java.util.ArrayList<java.util.ArrayList<com.google.android.gms.maps.model.LatLng>>>
        Returns:
        array of outer boundary coordinates
      • getInnerBoundaryCoordinates

        public java.util.List<java.util.List<com.google.android.gms.maps.model.LatLng>> getInnerBoundaryCoordinates()
        Gets an array of arrays of inner boundary coordinates
        Specified by:
        getInnerBoundaryCoordinates in interface DataPolygon<java.util.ArrayList<java.util.ArrayList<com.google.android.gms.maps.model.LatLng>>>
        Returns:
        array of arrays of inner boundary coordinates
      • toString

        @NonNull
        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object