Waze Map Editor JavaScript SDK
    Preparing search index...

    Class Turns

    Methods for dealing with Turns.

    Index

    Methods

    • Checks if the turns through the specified node can be edited.

      Parameters

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

          An id of the node to check edit permissions for.

      Returns boolean

      true if all the segments going through the node allow connections to be edited.

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

    • Returns Turn[]

      an array of all the turns in the WME data model

    • Parameters

      • args: { turnId: string }
        • turnId: string

          An id of the turn to find.

      Returns null | Turn

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

    • Get all turns from the segment

      Parameters

      • args: { segmentId: number }
        • segmentId: number

          An id of the segment to find turns for.

      Returns Turn[]

      all turns from the segment

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

    • Get all known turns through the node.

      Parameters

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

          An id of the node to find turns for.

      Returns Turn[]

      an array of all known turns through the node

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

    • Get all turns to the segment

      Parameters

      • args: { segmentId: number }
        • segmentId: number

          An id of the segment to find turns for.

      Returns Turn[]

      all turns to the segment

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

    • Determine if a turn is allowed between segments based on turn data

      Parameters

      • args: { fromSegmentId: number; nodeId: number; toSegmentId: number }
        • fromSegmentId: number

          An id of the first segment to find the turn by.

        • nodeId: number

          An id of the node to find the turn by.

        • toSegmentId: number

          An id of the second segment to find the turn by.

      Returns boolean

      true if a turn is allowed

      DataModelNotFoundError in case the node or any of the segments is not found in the WME data model

    • Determine if a turn is allowed between segments based on directions

      Parameters

      • args: { fromSegmentId: number; nodeId: number; toSegmentId: number }
        • fromSegmentId: number

          An id of the first segment to find the turn by.

        • nodeId: number

          An id of the node to find the turn by.

        • toSegmentId: number

          An id of the second segment to find the turn by.

      Returns boolean

      true if a turn is allowed

      DataModelNotFoundError in case the node or any of the segments is not found in the WME data model

    • Update turn by id.

      Parameters

      • args: { isAllowed?: boolean; turnId: string }
        • OptionalisAllowed?: boolean

          If turn is allowed or not.

        • turnId: string

          An id of the turn to update.

      Returns void

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

      InvalidStateError if no attribute to update was provided or if not allowed to update the turn