Waze Map Editor JavaScript SDK
    Preparing search index...

    Class Nodes

    Methods for dealing with Nodes.

    Index

    Methods

    • Allow or disallow turns through the node.

      Parameters

      • args: { allow: boolean; nodeId: number }
        • allow: boolean

          If navigation through the node is allowed or not.

        • nodeId: number

          The id of the node.

      Returns boolean

      false if there's nothing to change(all turns are already allowed/disallowed or there are no turns), true if the change is successful.

      DataModelNotFoundError in case the node is not found in the WME data model

      InvalidStateError if not allowed to edit node connections

    • Parameters

      • args: { nodeId: number }
        • nodeId: number

          An id of the node to find.

      Returns boolean

      true if node properties are editable.

      DataModelNotFoundError If a node with the specified ID is not found in the data model.

    • Parameters

      • args: { nodeId: number }
        • nodeId: number

          An id of the node to find.

      Returns boolean

      true if all segments connected to the node are allowed to edit connections.

      DataModelNotFoundError If a node with the specified ID is not found in the data model.

    • Returns Node[]

      an array of all the nodes in the WME data model

    • Parameters

      • args: { nodeId: number }
        • nodeId: number

          An id of the node to find.

      Returns null | Node

      node with id, or null if not found in the WME data model

    • Parameters

      • args: { nodeId: number }

      Returns boolean

      boolean indicating whether the node is virtually connected to any segment.

      DataModelNotFoundError If a node with the specified ID is not found in the data model.

    • Moves a node to a new location on the map.

      This method allows you to relocate an existing node to a different position. Note: Moving a node will affect all segments connected to that node, as the geometry of those segments will be modified to maintain the connection.

      Parameters

      • args: { geometry: Point; id: number }
        • geometry: Point

          The new geometry for the node to move.

        • id: number

          The id of the node to move.

      Returns void

      DataModelNotFoundError If a node with the specified ID is not found in the data model.

      InvalidStateError If editing is not allowed or if the action to move the node fails.