Waze Map Editor JavaScript SDK
    Preparing search index...

    Class MapComments

    Methods for dealing with MapComments.

    Index

    Methods

    • Adds a new map comment to the WME data model.

      Parameters

      • args: { body: string; endDate: number; geometry: Point | Polygon; subject: string }
        • body: string

          The body of the comment.

        • endDate: number

          The expiration date of the comment in the timezone of the comment location.

        • geometry: Point | Polygon

          The GeoJSON representation of the comment's location.

        • subject: string

          The subject of the comment.

      Returns MapComment

      the created map comment.

      ValidationError if endDate is invalid.

      InvalidStateError if provided lockRank is higher than the current user rank.

    • Parameters

      • args: { mapCommentId: string }
        • mapCommentId: string

          An id of the map comment to find.

      Returns null | MapComment

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

    • Updates a map comment in the WME data model.

      Parameters

      • args: {
            body?: string;
            endDate?: null | number;
            geometry?: Point | Polygon;
            mapCommentId: string;
            subject?: string;
        }
        • Optionalbody?: string

          The body of the comment.

        • OptionalendDate?: null | number

          The expiration date of the comment in the timezone of the comment location.

        • Optionalgeometry?: Point | Polygon

          The GeoJSON representation of the comment's location.

        • mapCommentId: string

          An id of the map comment to edit.

        • Optionalsubject?: string

          The subject of the comment.

      Returns MapComment

      the updated map comment.

      ValidationError if endDate is invalid.

      DataModelNotFoundError if the specified map comment cannot be found in the data model.