isLocationInAnyPolygon method

bool isLocationInAnyPolygon(
  1. double latitude,
  2. double longitude
)

Returns true if the location is inside any registered polygon.

Implementation

bool isLocationInAnyPolygon(double latitude, double longitude) {
  for (final polygon in _polygons.values) {
    if (polygon.containsPoint(latitude, longitude)) {
      return true;
    }
  }
  return false;
}