A sector is a Shape that represents a general circular sector in the 2D space.

The sector is defined by:

A sector cannot be instantiated directly. It must be instantiated using createSector.

Hierarchy

Constructors

Accessors

  • get bounds(): Bounds
  • The bounds of this shape. This property is to be treated in a read only manner. An error will be thrown when trying to assign to this property. Note that the bounds property is not immutable. Modifying properties of the bounds property may corrupt your data.

    Returns Bounds

  • get coordinateType(): CoordinateType
  • The coordinate type this shape. This property is read only. An Error will be thrown when trying to assign to this property.

    Returns CoordinateType

  • get focusPoint(): Point
  • The focus point. This field is read-only.

    Returns Point

  • get radius(): number
  • The radius of this sector, in meters. This field is mutable.

    Returns number

  • set radius(radius): void
  • Parameters

    • radius: number

    Returns void

  • get reference(): null | CoordinateReference
  • The spatial reference of this shape. This property is read only. An Error will be thrown when trying to assign to this property.

    Returns null | CoordinateReference

  • get startAzimuth(): number
  • The start angle. It is defined as an azimuth: degrees, clockwise, starting up/north. This field is mutable.

    Returns number

  • set startAzimuth(startAzimuth): void
  • Parameters

    • startAzimuth: number

    Returns void

  • get sweepAngle(): number
  • The angle over which the shape extends, in degrees, positive clockwise. This field is mutable.

    Returns number

  • set sweepAngle(sweepAngle): void
  • Parameters

    • sweepAngle: number

    Returns void

Methods

  • Determines whether a given point is inside this shape. This method checks containment only in two dimensions: on the (x,y)-axis or the (lon,lat)-axis (depending on the spatial reference of the shape).

    Parameters

    • x: number | Point | Bounds

      The point for which containment must be checked. If a 3D point is passed to this function, it will be treated as a 2D point: the z coordinate (height) will be ignored. The reference of this point must be the same reference as this Shape

    • Optional y: number

    Returns boolean

    true when the given point is contained in this shape

    Throws

    Point with another spatial reference

    Deprecated

    Please use contains2DPoint instead.

  • Determines whether the given point is inside this shape. This method checks containment only in two dimensions: on the (x,y)-axis or the (lon,lat)-axis (depending on the spatial reference of the shape).

    Parameters

    • aX: number

      The x coordinate of the point for which containment must be checked

    • aY: number

      The y coordinate of the point for which containment must be checked

    Returns boolean

    true when the given point is contained in this shape

    Throws

    Point with another spatial reference

  • Determines whether the given point is inside this shape. This method checks containment only in two dimensions: on the (x,y)-axis or the (lon,lat)-axis (depending on the spatial reference of the shape).

    Parameters

    • point: Point

      The point for which containment must be checked.

    Returns boolean

    true when the given point is contained in this shape

    Throws

    Point with another spatial reference

  • Indicates whether this shape is equal to another.

    Parameters

    • aSector: Shape

      the other shape this shape is compared with.

    Returns boolean

    true if both shapes are equal, false otherwise.

  • Moves the center point to another location. The passed x and y coordinates are expressed in the reference. The passed coordinates will become the coordinates of the center point.

    Parameters

    • x: number

      the x coordinate of the point.

    • y: number

      the y coordinate of the point.

    Returns void

  • Moves this center point to another location. The center point will be moved to the location of the passed point. The reference of the passed point must match the reference of the shape.

    Parameters

    • point: Point

      the point to move the center point to.

    Returns void

    Throws

    InvalidReferenceError when the reference of the Point parameter does not correspond with the reference of this shape.

  • Converts the shape to a string. This functionality is for debugging purposes only. Results of toString cannot be used to uniquely identify a shape instance.

    Returns string

  • Translates the shape over the given vector in 2D space.

    Parameters

    • x: number

      The x coordinate of the translation vector

    • y: number

      The y coordinate of the translation vector

    Returns void