Class GeoJsonPolygon
- java.lang.Object
-
- com.google.maps.android.data.geojson.GeoJsonPolygon
-
- All Implemented Interfaces:
DataPolygon
,Geometry
public class GeoJsonPolygon extends java.lang.Object implements DataPolygon
A GeoJsonPolygon geometry contains an array of arrays ofLatLng
s. The first array is the polygon exterior boundary. Subsequent arrays are holes.
-
-
Constructor Summary
Constructors Constructor Description GeoJsonPolygon(java.util.List<? extends java.util.List<com.google.android.gms.maps.model.LatLng>> coordinates)
Creates a new GeoJsonPolygon object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<? extends java.util.List<com.google.android.gms.maps.model.LatLng>>
getCoordinates()
Gets a list of a list of coordinates of the GeoJsonPolygonsjava.util.List<? extends java.util.List<com.google.android.gms.maps.model.LatLng>>
getGeometryObject()
Gets the stored geometry objectjava.lang.String
getGeometryType()
Gets the type of geometryjava.util.ArrayList<java.util.ArrayList<com.google.android.gms.maps.model.LatLng>>
getInnerBoundaryCoordinates()
Gets an array of arrays of inner boundary coordinatesjava.util.ArrayList<com.google.android.gms.maps.model.LatLng>
getOuterBoundaryCoordinates()
Gets an array of outer boundary coordinatesjava.lang.String
getType()
Gets the type of geometry.java.lang.String
toString()
-
-
-
Method Detail
-
getType
public java.lang.String getType()
Gets the type of geometry. The type of geometry conforms to the GeoJSON 'type' specification.- Returns:
- type of geometry
-
getCoordinates
public java.util.List<? extends java.util.List<com.google.android.gms.maps.model.LatLng>> getCoordinates()
Gets a list of a list of coordinates of the GeoJsonPolygons- Returns:
- list of a list of coordinates of the GeoJsonPolygon
-
getGeometryObject
public java.util.List<? extends java.util.List<com.google.android.gms.maps.model.LatLng>> getGeometryObject()
Gets the stored geometry object- Specified by:
getGeometryObject
in interfaceGeometry
- Returns:
- geometry object
-
getGeometryType
public java.lang.String getGeometryType()
Gets the type of geometry- Specified by:
getGeometryType
in interfaceGeometry
- Returns:
- type of geometry
-
getOuterBoundaryCoordinates
public java.util.ArrayList<com.google.android.gms.maps.model.LatLng> getOuterBoundaryCoordinates()
Gets an array of outer boundary coordinates- Specified by:
getOuterBoundaryCoordinates
in interfaceDataPolygon
- Returns:
- array of outer boundary coordinates
-
getInnerBoundaryCoordinates
public java.util.ArrayList<java.util.ArrayList<com.google.android.gms.maps.model.LatLng>> getInnerBoundaryCoordinates()
Gets an array of arrays of inner boundary coordinates- Specified by:
getInnerBoundaryCoordinates
in interfaceDataPolygon
- Returns:
- array of arrays of inner boundary coordinates
-
toString
@NonNull public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-