containsCoordinates method

  1. @override
bool containsCoordinates(
  1. Coordinates point
)
override

Tests whether a coordinate point lies within this geographic area.

Performs a containment test to determine if the specified coordinate falls inside the boundaries of this geographic area. The exact algorithm depends on the concrete implementation.

Altitude values are ignored in the calculation.

Parameters

  • point: The Coordinates to test for containment. Only latitude and longitude are considered; altitude is ignored.

Returns

  • true when the point lies inside the area boundaries, false otherwise.

Implementation

@override
bool containsCoordinates(final Coordinates point) {
  return point.distance(centerCoordinates, ignoreAltitude: true) <= radius;
}