maps-utils-ktx / com.google.maps.android.ktx.utils / com.google.android.gms.maps.model.Polygon

Extensions for com.google.android.gms.maps.model.Polygon

area

The area of this Polygon on Earth in square meters.

val Polygon.area: Double

contains

Computes whether or not latLng is contained within this Polygon.

fun Polygon.contains(latLng: LatLng): Boolean

isOnEdge

Checks whether or not latLng lies on or is near the edge of this Polygon within a tolerance (in meters) of tolerance. The default value is PolyUtil.DEFAULT_TOLERANCE.

fun Polygon.isOnEdge(latLng: LatLng, tolerance: Double = 0.1): Boolean

signedArea

Computes the signed area under a closed path on Earth. The sign of the area may be used to determine the orientation of the path.

val Polygon.signedArea: Double