XYZ Maps Documentation
    Preparing search index...

    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.

    Index
    distance: number

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

    link: Navlink

    The target Navlink to which the connection can be established.

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

    segment: number

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

    • 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] }

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

      • OptionalsplittedInto?: [Navlink, Navlink]

        The two new Navlinks created by splitting the own link (if the shape was not a node).

      • OptionaltargetSplittedInto?: [Navlink, Navlink]

        The two new Navlinks created by splitting the target link.