Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ConnectionCandidate

A ConnectionCandidate represents a possible connection between a NavlinkShape and a nearby Navlink. It is returned by NavlinkShape.getConnectionCandidates and provides information about the target link, the connection point, and the distance. The connection can be established by calling ConnectionCandidate.connect.

Hierarchy

  • ConnectionCandidate

Index

Properties

Methods

Properties

Readonly distance

distance: number

The distance in meters between the shape's position and the connection point on the target link.

Readonly link

link: Navlink

The target Navlink to which the connection can be established.

Readonly point

The geographical coordinate on the target link's geometry where the connection would be established.

Readonly segment

segment: number | null

The segment index on the target link where the connection point is located.

Methods

connect

  • Connects the NavlinkShape to the target Navlink. This will create a new shape on the target link at the connection point and split the target link at that position. If the shape is not a node (start/end point) of the Navlink, the own Navlink will also be split.

    Returns { splittedInto?: [Navlink, Navlink]; targetSplittedInto?: [Navlink, Navlink] } | null

    Object containing the resulting split links, or null if the connection could not be established.

Generated using TypeDoc