maps_toolkit
maps_toolkit copied to clipboard
What Unit of Measurement is Being Used for The Area, Square Meters?
it gives incorrect answer anyways. I compared with online tools and with js package
yes, it's giving wrong for me too. The unit is square meters, it's given in the method comments.
Yes it's square meters. And polygon must be "closed", i.e. first point = last point, for ex.:
final p1 = LatLng(45.153474463955796, 39.33852195739747);
final p2 = LatLng(45.153474463955796, 39.33972358703614);
final p3 = LatLng(45.15252112936569, 39.33972358703614);
final p4 = LatLng(45.1525022138355, 39.3385460972786);
expect(
SphericalUtil.computeArea([p1, p2, p3, p4, p1]),
closeTo(9987, 1));