• JMap.Geometry.getRotatedFeature

    Returns the feature with geometry rotated from the centroid.

    Parameters

    • feature: Feature<Geometry, GeoJsonProperties>

      the feature

    • angleInDegrees: number

      from -360 to 360 degrees

    Returns GeoJSON.Feature

    Throws

    if layer not found or layer is a layer group

    Example

    // 37 degrees rotation of the polygon
    const polygon = ...
    const rotatedPolygon = JMap.Geometry.getRotatedFeature(polygon, 37)