WebCola
Options
All
  • Public
  • Public/Protected
  • All
Menu

A new circle generator

The first generic corresponds to the "this"-context within which the geo circle generator will be invoked.

The second generic corresponds to the type of the Datum which will be passed into the geo circle generator.

Type parameters

  • This

  • Datum

Hierarchy

  • GeoCircleGenerator

Callable

  • __call(this: This, d?: Datum, ...args: any[]): Polygon
  • Returns a new GeoJSON geometry object of type “Polygon” approximating a circle on the surface of a sphere, with the current center, radius and precision. Any arguments are passed to the accessors.

    The first generic corresponds to the "this"-context within which the geo circle generator will be invoked.

    The second generic corresponds to the type of the Datum which will be passed into the geo circle generator.

    Parameters

    • this: This
    • Optional d: Datum
    • Rest ...args: any[]

    Returns Polygon

Index

Methods

center

  • center(): function
  • center(center: [number, number])
  • center(center: function)
  • Returns the current center accessor, which defaults to a function returning [0, 0].

    Returns function

      • (this: This, d: Datum, ...args: any[]): [number, number]
      • Parameters

        • this: This
        • d: Datum
        • Rest ...args: any[]

        Returns [number, number]

  • Sets the circle center to the specified point [longitude, latitude] in degrees, and returns this circle generator.

    Parameters

    • center: [number, number]

      Center point specified as [longitude, latitude] in degrees.

  • Sets the circle center to the specified center point accessor function, and returns this circle generator.

    Parameters

    • center: function

      An accessor function which will be invoked whenever a circle is generated, being passed any arguments passed to the circle generator. It returns the center point specified as [longitude, latitude] in degrees.

        • (this: This, d: Datum, ...args: any[]): [number, number]
        • Parameters

          • this: This
          • d: Datum
          • Rest ...args: any[]

          Returns [number, number]

precision

  • precision(): function
  • precision(precision: number)
  • precision(precision: function)
  • Returns the current precision accessor, which defaults to a function returning 6.

    Returns function

      • (this: This, d: Datum, ...args: any[]): number
      • Parameters

        • this: This
        • d: Datum
        • Rest ...args: any[]

        Returns number

  • Sets the circle precision to the specified angle in degrees, and returns this circle generator.

    Small circles do not follow great arcs and thus the generated polygon is only an approximation. Specifying a smaller precision angle improves the accuracy of the approximate polygon, but also increase the cost to generate and render it.

    Parameters

    • precision: number

      Precision as specified angle in degrees.

  • Sets the circle precision to the precision accessor function, and returns this circle generator.

    Small circles do not follow great arcs and thus the generated polygon is only an approximation. Specifying a smaller precision angle improves the accuracy of the approximate polygon, but also increase the cost to generate and render it.

    Parameters

    • precision: function

      An accessor function which will be invoked whenever a circle is generated, being passed any arguments passed to the circle generator. It returns the precision as the specified angle in degrees.

        • (this: This, d: Datum, ...args: any[]): number
        • Parameters

          • this: This
          • d: Datum
          • Rest ...args: any[]

          Returns number

radius

  • radius(): function
  • radius(radius: number)
  • radius(radius: function)
  • Returns the current radius accessor, which defaults to a function returning 90.

    Returns function

      • (this: This, d: Datum, ...args: any[]): number
      • Parameters

        • this: This
        • d: Datum
        • Rest ...args: any[]

        Returns number

  • Sets the circle radius to the specified angle in degrees, and returns this circle generator.

    Parameters

    • radius: number

      Circle radius as the specified angle in degrees.

  • Sets the circle radius to the specified radius accessor function, and returns this circle generator.

    Parameters

    • radius: function

      An accessor function which will be invoked whenever a circle is generated, being passed any arguments passed to the circle generator. It returns the radius as the specified angle in degrees.

        • (this: This, d: Datum, ...args: any[]): number
        • Parameters

          • this: This
          • d: Datum
          • Rest ...args: any[]

          Returns number

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc