• JMap.Layer.DynamicFilter.existSimilarCondition

    Returns true if the condition already exist for the layer.

    It doesn't check the id of the condition, only the values.

    Parameters

    • condition: JDynamicFilterCondition

      The condition to verify

    • Optional isUpdate: boolean

      tell if the check is for a creation or an update

    Returns boolean

    Throws

    if condition is not correct

    Example

    // log in console a message if this condition already exist
    if (!JMap.Layer.DynamicFilter.existSimilarCondition(myCondition)) {
    console.log("Same condition values already exist")
    }