Waze Map Editor JavaScript SDK
    Preparing search index...

    Class RoadClosures

    Methods for dealing with RoadClosures.

    Index

    Methods

    • Adds a new road closure to the WME data model.

      Parameters

      • args: {
            description: string;
            endDate: number;
            fromNodeClosed: boolean;
            isForward: boolean;
            isPermanent: boolean;
            segmentId: number;
            startDate: number;
            trafficEventId: null | string;
        }
        • description: string

          The description of the road closure.

        • endDate: number

          The end date of the road closure as a Unix timestamp (milliseconds).

        • fromNodeClosed: boolean

          A flag to indicate the whether to close the starting node. isForward = true(A -> B) means fromNodeClosed = true will close node A, isForward = false(B -> A) means fromNodeClosed = true will close node B,

        • isForward: boolean

          A flag to indicate the closure's direction on the segment. isForward = true means that the closure is on segment from A -> B direction, isForward = false means that the closure is on segment from B -> A direction.

        • isPermanent: boolean

          A flag to indicate if the closure should be auto finished when traffic is detected in the road. When true, the closure will remain active until the end date, even if traffic is detected on the road.

        • segmentId: number

          The id of the segment that the closure is on.

        • startDate: number

          The start date of the road closure as a Unix timestamp (milliseconds).

        • trafficEventId: null | string

          The id of the traffic event associated with the closure.

      Returns RoadClosure

      the created road closure.

      DataModelNotFoundError if the specified segment cannot be found in the data model.

      DataModelNotFoundError if the trafficEventId is provided and cannot be found in the data model.

    • Parameters

      • args: { roadClosureId: string }
        • roadClosureId: string

          An id of the road closure to find.

      Returns null | RoadClosure

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