findPolygonCentroid method

LatLng findPolygonCentroid(
  1. List<LatLng> polygons
)

Find the centroid of a polygon defined by a list of polygons points.

Given a list of polygons points representing the vertices of a polygon, this function calculates and returns the centroid of the polygon as a LatLng object.

Implementation

LatLng findPolygonCentroid(List<LatLng> polygons) {
  return PolygonCentroid.findPolygonCentroid(polygons);
}