@watergis/maplibre-gl-terradraw
    Preparing search index...
    • convert area unit to metric or imperial

      Parameters

      • value: number

        area value in m2

      • unit: AreaUnit

        area unit either metric or imperial

      • forceUnit: forceAreaUnitType = 'auto'

        Default is auto. If auto is set, unit is converted depending on the value and selection of area unit. If a specific unit is specified, it returns the value always the same. If a selected unit is not the same type of unit either metric of imperial, it will be ignored, and auto will be applied.

      Returns { area: number; unit: string }

      result object with area and unit properties adter unit conversion