containsLocation

inline fun List<LatLng>.containsLocation(latLng: LatLng, geodesic: Boolean): Boolean

Computes whether the latLng lies inside this.

The polygon is always considered closed, regardless of whether the last point equals the first or not.

Inside is defined as not containing the South Pole -- the South Pole is always outside. The polygon is formed of great circle segments if geodesic is true, and of rhumb (loxodromic) segments otherwise.

Parameters

latLng

the LatLng to check if it is contained within this polygon

geodesic

if this Polygon is geodesic or not

See also

PolyUtil.containsLocation