measurePolygonArea
Measures the area (square metres) enclosed by positions.
This is a function exported by @mapcairn/core, checked against version 0.2.0.
Signature
import { measurePolygonArea } from "@mapcairn/core";
function measurePolygonArea(positions: readonly Position_2[]): number | null;
Parameters
positions(readonly Position_2[]): Ring vertices as[lon, lat], e.g. points a user has clicked while measuring on a map. The ring is closed automatically ifpositionsdoesn't already repeat its first point as its last.
Returns
number | null: The enclosed area, or null if there are fewer than three
positions to form a polygon from.