getPolygonIntersection method

List<LatLng> getPolygonIntersection(
  1. List<LatLng> polygon1,
  2. List<LatLng> polygon2
)

Calculate the intersection points of two polygons represented by lists of polygon1 and polygon2 points.

Given two lists of polygon1 and polygon2 points representing the vertices of two polygons, this function calculates and returns a list of LatLng intersection points between the two polygons.

Implementation

List<LatLng> getPolygonIntersection(
    List<LatLng> polygon1, List<LatLng> polygon2) {
  return PolygonIntersection.getPolygonIntersection(polygon1, polygon2);
}