v1.0.1
polylabel
A fast algorithm for finding polygon pole of inaccessibility implemented as a Dart library. Useful for optimal placement of a text label on a polygon.
10Likes 368K30-day downloads160Pub points
AndroidiOSWebmacOSWindowsLinux
Dart port of https://github.com/mapbox/polylabel
English project snapshot. Visit GitHub for the latest content.
Dart port of https://github.com/mapbox/polylabel.
A fast algorithm for finding polygon pole of inaccessibility implemented as a Dart library. Useful for optimal placement of a text label on a polygon.
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(Point(0.5, 0.5), distance: 0.5)
Dependency list 3 items
^1.15.0^1.0.0^1.16.0Start with your use case, compare repository activity, and check the original project before adopting it.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗