@watergis/maplibre-gl-terradraw
    Preparing search index...

    Function calcArea

    • Calculate area from polygon feature

      Parameters

      • feature: GeoJSONStoreFeatures

        Polygon GeoJSON feature

      • unitType: MeasureUnitType

        measure unit type either metric or imperial

      • areaPrecision: number

        Precision of area value

      • OptionalforceUnit: forceAreaUnitType

        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.

      • OptionalmeasureUnitSymbols: MeasureUnitSymbolType

        Optional parameter to provide custom unit symbols

      Returns GeoJSONStoreFeatures

      The returning feature will contain area,unit properties.