polylabel 0.2.0 polylabel: ^0.2.0 copied to clipboard
Dart port of https://github.com/mapbox/polylabel.
polylabel #
Dart port of https://github.com/mapbox/polylabel.
Usage #
import 'dart:math';
import 'package:polylabel/polylabel.dart';
final polygon = [[Point(0, 0), Point(1, 0), Point(1, 1), Point(0, 1), Point(0, 0)]];
final result = polylabel(polygon); // PolylabelResult{x: 0.5, y: 0.5, distance: 0.5}