• JMap.Geometry.getArea

    Works for feature having geometry equals to Polygon or a MultiPolygon.

    It returns the area in square meters.

    Throw an error if the provided feature geometry is not a Polygon or a MultiPolygon.

    Parameters

    • feature: Feature<Geometry, GeoJsonProperties>

      The Polygon or MultiPolygon feature

    Returns number

    Example

    const feature = ...
    // The method will return the area in m2
    JMap.Geometry.getArea(feature)