Skip to main content

polygon_checker 1.1.0 copy "polygon_checker: ^1.1.0" to clipboard
polygon_checker: ^1.1.0 copied to clipboard

A lightweight Dart utility to check whether a point lies inside polygon locations.

example/main.dart

import 'package:polygon_checker/polygon_checker.dart';

void main() {
  final offices = [
    PolygonLocation(
      locationId: '1',
      locationName: 'Office A',
      points: [
        PolygonPoint(lat: 28.61, lng: 77.20),
        PolygonPoint(lat: 28.62, lng: 77.20),
        PolygonPoint(lat: 28.62, lng: 77.21),
        PolygonPoint(lat: 28.61, lng: 77.21),
      ],
    ),
  ];

  final isInside = PolygonChecker.isInsideAnyOfficePolygon(
    28.615,
    77.205,
    offices,
  );

  print(isInside); // true / false
}
0
likes
150
points
17
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A lightweight Dart utility to check whether a point lies inside polygon locations.

Repository (GitHub)
View/report issues

License

MIT (license)

More

Packages that depend on polygon_checker