Class ArrowStyle

A style which renders arrow heads at the ends of a line string. This style cannot be applied to non-LineString geometries. When setting this on a layer with heterogeneous geometry types, use a style function.

Hierarchy

Accessors

Constructors

Methods

  • Parameters

    • ctx: CanvasRenderingContext2D
    • imagePosition: Coordinate
    • rotation: number
    • pixelRatio: number

    Returns void

  • Get the fill style.

    Returns Fill

    Fill style.

    Api

  • Get the geometry to be rendered.

    Returns string | Geometry | GeometryFunction

    Feature property or geometry or function that returns the geometry that will be rendered with this style.

    Api

  • Get the function used to generate a geometry for rendering.

    Returns GeometryFunction

    Function that is called with a feature and returns the geometry to render instead of the feature's geometry.

    Api

  • Get the custom renderer function that was configured with #setHitDetectionRenderer or the hitDetectionRenderer constructor option.

    Returns null | RenderFunction

    Custom renderer function.

    Api

  • Get the image style.

    Returns ImageStyle

    Image style.

    Api

  • Returns the style used to render primitives (a style with a circle image and the color of this style).

    Returns Style

  • Get the custom renderer function that was configured with #setRenderer or the renderer constructor option.

    Returns null | RenderFunction

    Custom renderer function.

    Api

  • Get the stroke style.

    Returns Stroke

    Stroke style.

    Api

  • Get the text style.

    Returns Text

    Text style.

    Api

  • Get the z-index for the style.

    Returns undefined | number

    ZIndex.

    Api

  • Set the fill style.

    Parameters

    • fill: Fill

      Fill style.

    Returns void

    Api

  • Set a geometry that is rendered instead of the feature's geometry.

    Parameters

    • geometry: string | Geometry | GeometryFunction

      Feature property or geometry or function returning a geometry to render for this style.

    Returns void

    Api

  • Sets a custom renderer function for this style used in hit detection.

    Parameters

    • renderer: null | RenderFunction

      Custom renderer function.

    Returns void

    Api

  • Set the image style.

    Parameters

    • image: ImageStyle

      Image style.

    Returns void

    Api

  • Sets a custom renderer function for this style. When set, fill, stroke and image options of the style will be ignored.

    Parameters

    • renderer: null | RenderFunction

      Custom renderer function.

    Returns void

    Api

  • Set the stroke style.

    Parameters

    • stroke: Stroke

      Stroke style.

    Returns void

    Api

  • Set the text style.

    Parameters

    • text: Text

      Text style.

    Returns void

    Api

  • Set the z-index.

    Parameters

    • zIndex: undefined | number

      ZIndex.

    Returns void

    Api

Properties

Generated using TypeDoc