• JMap.Form.getElement

    Returns form data of an element from given parameters.

    Works only for attribute forms.

    Parameters

    Returns Promise<JFormElement | undefined>

    Throws

    if layer not found, if form not found, or form is not an attribute form

    Example

    // returns element form data for layer id=3, form id=2, and element id=245
    JMap.Form
    .getElement({
    layerId: 3,
    formId: 2,
    elementId: 245
    })
    .then(element => console.log("Element:", element))
    .catch(error => console.error("An error occurred when getting element data", error))