• JMap.Application.Message.closeWaitingOverlay

    Close all overlay messages or just one.

    If no overlay is displayed, do nothing.

    Parameters

    • Optional messageId: string

      the message to close

    Returns void

    Throws

    if you pass a message id that is not found

    Example

    // display a waiting overlay, making the app unavailable for user as long it is displayed
    const messageId = JMap.Application.Message.displayWaitingOverlay("Please wait, processing data")
    // NG app is now unavailable for the user
    // You can do some asynchronous processing
    myAsyncProcess()
    .then(() => {
    // close the waiting overlay
    JMap.Application.Message.closeWaitingOverlay(messageId)
    // NG App is now available again
    JMap.Application.Message.success("The process was successfully completed")
    })
    .catch(error => {
    // close the waiting overlay
    JMap.Application.Message.closeWaitingOverlay(messageId)
    // NG App is now available again
    console.error(error)
    JMap.Application.Message.error("An error has occurred while processing")
    })