ngeo
    Preparing search index...

    Interaction dedicated to measure length.

    See our live example: ../examples/measure.html

    Index

    Constructors

    Properties

    continueMsg: Element | HTMLSpanElement
    displayHelpTooltip_: boolean

    Whether or not to display any tooltip

    format: unitPrefix

    The format function

    helpTooltipElement_: HTMLElement

    The help tooltip element.

    helpTooltipOverlay_: Overlay

    Overlay to show the help messages.

    sketchFeature: Feature<Geometry>

    The sketch feature.

    source: VectorSource<any>

    The snapping source

    spherical: boolean
    startMsg: Element

    The message to show when user is about to start drawing.

    tolerance: number

    The snapping tolerance in pixels.

    Methods

    • Compute the intersection between 2 segments.

      Parameters

      • line1: number[][]

        The coordinates of the first line.

      • line2: number[][]

        The coordinates of the second line.

      Returns number[]

      The intersection point, undefined if there is no intersection point or lines are coincident.

    • Parameters

      • style: StyleLike

        The sketchStyle used for the drawing interaction.

      • source: VectorSource<LineString>

        Vector source.

      Returns Draw | default

      The interaction

    • Returns DrawAzimut | Draw | default

      The draw interaction.

    • Get a reference to the tooltip element.

      Returns Element

      Tooltip Element.

    • Function implemented in inherited classes to compute measurement, determine where to place the tooltip and determine which help message to display.

      Parameters

      • callback: (arg0: string, arg1: Coordinate) => void

        The function to be called.

      Returns void

    • Create a linestringGeometryFunction that will create a line string with segments snapped to π/4 angle. Use this with the draw interaction and type: 'LineString'.

      Parameters

      • coordinates: number[][]

        Coordinates.

      • Optionalopt_geometry: SimpleGeometry

        Geometry.

      Returns SimpleGeometry

      Geometry.