diff --git a/src/utils.ts b/src/utils.ts index 7fe1d53..4967f6e 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -4,8 +4,8 @@ import { getArea } from "ol/sphere"; /** * Calculate & format the area of a polygon * @param polygon - * @param units - defaults to square metres, or supports "ha" for hectares - * @returns - a string with html tags + * @param units - defaults to square metres ("m2"), or supports "ha" for hectares + * @returns - a string */ export function formatArea(polygon: Geometry, units: String = "m2") { const area = getArea(polygon); @@ -15,7 +15,7 @@ export function formatArea(polygon: Geometry, units: String = "m2") { let output; if (units === "m2") { - output = squareMetres + " m2"; + output = squareMetres + " m²"; } else if (units === "ha") { output = hectares + " ha"; }