@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

      • OptionalareaUnit: areaUnitType

        If undefined, it will be treated as 'auto' conversion of area unit according the default conversion rules. If a specific unit is set, the value is converted to that unit. If a callback function is set, it will be used for custom conversion.

      • OptionalmeasureUnitSymbols: MeasureUnitSymbolType

        Optional parameter to provide custom unit symbols

      Returns GeoJSONStoreFeatures

      The returning feature will contain area,unit properties.