Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • MatrixUtils

Index

Methods

Static getCentroid

  • getCentroid(geometry: Geometry): Point
  • Returns an approximation of the center point of the given geometry, as measured in Cartesian space.

    Parameters

    • geometry: Geometry

      The geometry whose center needs to be returned

    Returns Point

Static rotate

  • rotate(geometry: Geometry, map: Map, degreesClockwise: number, pivotMapPoint?: Point): TransformationResult
  • Rotates a given polygon or polyline by a specified angle.

    Parameters

    • geometry: Geometry

      The Geometry to rotate.

    • map: Map
    • degreesClockwise: number

      The angle to rotate the polygon in, specified in degrees, in a clockwise direction (as is standard for esri)

    • Optional pivotMapPoint: Point

      The "pivot" around which to rotate the polygon. Is not required to lie on or within the polygon.

    Returns TransformationResult

Static scale

  • Scales (resizes) a given polygon or polyline by a specified scaling factor.

    Parameters

    • geometry: Geometry

      The Geometry to rotate.

    • map: Map
    • scaleX: number

      A scaling factor used for the x coordinate, or a uniform scaling factor used for the both coordinates.

    • Optional scaleY: number

      (Optional) A scaling factor used for the y coordinate.

    Returns TransformationResult

Static translate

  • Translates (moves) a given polygon or polyline by a specified offset.

    Parameters

    • geometry: Geometry

      The Geometry to rotate.

    • map: Map
    • dx: number

      The X offset.

    • dy: number

      The Y offset.

    Returns TransformationResult